How can I get/access the 'name' attribute from the user data dictionary in twitter in python?

74 Views Asked by At

I've downloaded some tweets with Twython. I want to get/access only the 'name' attribute from the 'user' object dictionary (e.g. {'id': 540179903, 'id_str': '540179903', 'name': 'Makis Voridis' etc. How could I solve this?? Thanks!!

1

There are 1 best solutions below

2
Tomás Mendes On BEST ANSWER

If it is a dictionary, you can simply acess each key by simply doing tweet['name'] and tweet being your dictionary.