My guess is that you probably want to create a list of dictionaries, where the values are a list of teams and odds. You are asking to have them as strings, which you can do but I suspect isn't ultimately what you need. In any case, here's how to do both.
You can use numpy to split each list into two halves, and iterate over each half of the two lists in parallel by using zip. Then it's a matter of using .join
if you really want a string, or .tolist()
if you end up wanting a list.
import numpy as np
teams = ['Team1','Team2','Team3','Team4']
odds = ['2','2.5','3','2.1','2.8','1.9']
out = []
for t,o in zip(np.array_split(teams,2),np.array_split(odds,2)):
out.append({
'team_str': ' - '.join(t),
'odds_str': ', '.join(o),
'team_list': t.tolist(),
'odds_list': o.tolist()
})
Output
[
{
'team_str': 'Team1 - Team2',
'odds_str': '2, 2.5, 3',
'team_list': ['Team1', 'Team2'],
'odds_list': ['2', '2.5', '3']
},
{
'team_str': 'Team3 - Team4',
'odds_str': '2.1, 2.8, 1.9',
'team_list': ['Team3', 'Team4'],
'odds_list': ['2.1', '2.8', '1.9']
}
]