Replies: 1 comment
-
Sure, so the schedule is an dict where the keys are the scoring period which translate to a game and the values are dict of the team and date. If all you need is the game and date of their earliest game you can do something like this # you could loop through teams and roster
schedule = league.teams[0].roster[0].schedule
list_schedule = list(schedule.values())
list_schedule.sort(key=lambda x: x['date'], reverse=False) This will sort all the values and have the earliest game at the first index of the array. Hopefully this helps! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey @cwendt94,
I have been using the
schedule
variable for the Player class but I am puzzled on how can find that player's earliest scheduled game. It would be helpful if you could offer some clarification to me. Thank you.Beta Was this translation helpful? Give feedback.
All reactions