How to access List elements

前端 未结 5 743
面向向阳花
面向向阳花 2020-11-27 19:30

I have a list

list = [[\'vegas\',\'London\'],[\'US\',\'UK\']]

How to access each element of this list?

5条回答
  •  暖寄归人
    2020-11-27 20:13

    It's simple

    y = [['vegas','London'],['US','UK']]
    
    for x in y:
        for a in x:
            print(a)
    

提交回复
热议问题