Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- x = [[1,2,3,4,5],[21,22,23,24,25],[31,32,33,34,35]]
- y = [0] * 3
- def first():
- print(x[1])
- def second():
- print(x[0][2])
- def third():
- print(x[2][1 : 3])
- def fourth():
- print(x[0][0:len(x[0]):2])
- def fifth():
- for i in range(len(x)):
- y[i] = sum(x[i]) / len(x[i])
- print(y)
- first()
- second()
- third()
- fourth()
- fifth()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement