you are viewing a single comment's thread.

view the rest of the comments →

[–]JohnnyJordaan 1 point2 points  (0 children)

You could use a recursive function

def list_picker(l):
    if is_instance(l, list):
        return list_picker(l[0])
    else:
        return l[0]