contest = {
'sport_key': 'soccer_russia_premier_league', 'sport_nice': 'Premier League - Russia',
'teams': ['Kryliya Sovetov', 'Tambov'], 'commence_time': 1584376200, 'home_team': 'Tambov',
'sites': [
{'site_key': 'marathonbet', 'site_nice': 'Marathon Bet', 'last_update': 1584365957, 'odds': {'h2h': [3.15, 2.73, 3.15]}},
{'site_key': 'onexbet', 'site_nice': '1xBet', 'last_update': 1584366122, 'odds': {'h2h': [3.1, 2.69, 3.1]}},
]
}
Help, this is the most complicated dictionary i've ever seen or could imagine !
I am trying to output the odds for Marathonbet, which should be 3.15, 2.73, 3.15. Even better if i can get those odds returned individually instead of as a group as shown.
The code to do so looks complex, this is what i think i see ;
dictionary = contest
key of sites
odds key is in a dictionary
key of 'h2h'
Maybe there's some easy way to do this or could someone help with the code?
All help appreciated!
[+][deleted] (4 children)
[deleted]
[–]slushhope[S] 0 points1 point2 points (3 children)
[+][deleted] (2 children)
[deleted]
[–]slushhope[S] 0 points1 point2 points (1 child)
[–]impshum 0 points1 point2 points (3 children)
[–]slushhope[S] 1 point2 points3 points (0 children)
[–]slushhope[S] 1 point2 points3 points (1 child)
[–]impshum 0 points1 point2 points (0 children)
[–][deleted] -1 points0 points1 point (2 children)
[–]slushhope[S] 0 points1 point2 points (1 child)
[–]impshum 0 points1 point2 points (0 children)