I have a list containing several tuples, for example:
[('a_key', 'a value'), ('another_key', 'another value')]
where the first values of the tuple act as dictionary keys. Now I'm looking for a python-like way to access key / value pairs, for example:
"mylist.a_key" or "mylist['a_key']"
without repeating the list. any ideas?
source
share