I'm wondering if this is possible in python. I'm accessing a list in this way:
print list[0]['name']
This is fine. Is there a way to use a variable? I mean:
a="[0]['name']"
print list[a]
Thanks for your suggestions.
Some details:
I have a situation where I have something like this:
a = [{"name":"someone", "age":23}]
print a[0]['name']
But since I need to pass "[0]['name']" as parameter, I'd like to understand if this is possible. Thanks,
cips