I have the following sample data as a listobject in python.
[{'itemdef': 10541,
'description': 'Dota 2 Just For Fun tournament. ',
'tournament_url': 'https://binarybeast.com/xDOTA21404228/',
'leagueid': 1212,
'name': 'Dota 2 Just For Fun'},
{'itemdef': 10742,
'description': 'The global Dota 2 league for everyone.',
'tournament_url': 'http://www.joindota.com/en/leagues/',
'leagueid': 1640,
'name': 'joinDOTA League Season 3'}]
How can i remove the description, tour_url from this list; or how can I only keep the name and leagueid keys. I have tried a variety of solutions, but it just doesnt seem to work.
2nd question: how can I filter this list? As in mysql:
select *
from table
where leagueid = 1212
Please treat me like a new person to python, because i really am.