I have a list
list = [[\'vegas\',\'London\'],[\'US\',\'UK\']]
How to access each element of this list?
Recursive solution to print all items in a list:
def printItems(l): for i in l: if isinstance(i,list): printItems(i) else: print i l = [['vegas','London'],['US','UK']] printItems(l)