Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- table = [...]
- # a)
- new_table = []
- for item in table:
- if item['leagueid'] == 1212:
- new_table.append(item)
- # b)
- new_table = [item for item in table if item['leagueid'] == 1212]
- # c)
- new_table = filter(lambda item: item['leagueid'] == 1212, table)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement