Created
July 5, 2013 08:31
-
-
Save imsickofmaps/5932957 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| max_id = [] # Variable to hold the max question id for menu endpoint | |
| for i in range(len(quiz_ids)): | |
| # Need to store end point for main_menu | |
| max_id.append(quiz_ids[i].data["id"]) | |
| max_id = max(max_id) |
or:
max_id = max([i.data["id"] for i in quiz_ids])
depending on the structure of quiz_ids.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
max_id = max([quiz_ids[i].data["id"] for i in quiz_ids])