Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import random
- def one(lenght):
- a = []
- for i in range(length):
- a.append(1)
- return(a)
- def two(parent):
- b = parent
- if random.randint(0,10)<11:
- index = random.randint(0,6)
- b[index] = 6
- return
- item1 = one(6)
- print(item1)
- item2 = item1
- print(item2)
- item3 = two(item1)
- print(item2)
- [1,1,1,1,1,1]
- [1,1,1,1,1,1]
- [1,6,1,1,1,1]
Add Comment
Please, Sign In to add comment