Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #---Lists in Python---
- #Declaration and initialization
- array = [1, 2, 3, 4, 5]
- #Lazy way of printing out the array
- print(array)
- #Right way of printing out the array
- x = 0
- for x in range(5):
- print(array[x]) #index [0 - n]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement