Hi guys
I'm looking for an equivalent in python of dictionary.get(key, default) for lists. Is there any one liner idiom to get the nth element of a list or a default value if not available?
For example, given a list myList I would like to get myList[0], or 5 if myList is an empty list
Thanks!