Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # list_array_gen.py
- myList=[[[] for i in range(3)] for i in range(5)]
- print myList
- myList[3][1].append('#')
- print myList
- myList[3][1].append(123)
- print myList
- # ...or even...
- myList=eval(str([[[]]*3]*5))
- print myList
- myList[3][1].append('abc')
- print myList
- myList[3][1].append(9)
- print myList
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement