Advertisement
newb_ie

abcd

Sep 3rd, 2021
208
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. x = [[1,2,3,4,5],[21,22,23,24,25],[31,32,33,34,35]]
  2. y = [0] * 3
  3.  
  4. def first():
  5. print(x[1])
  6.  
  7. def second():
  8. print(x[0][2])
  9.  
  10. def third():
  11. print(x[2][1 : 3])
  12.  
  13. def fourth():
  14. print(x[0][0:len(x[0]):2])
  15.  
  16. def fifth():
  17. for i in range(len(x)):
  18. y[i] = sum(x[i]) / len(x[i])
  19. print(y)
  20.  
  21. first()
  22. second()
  23. third()
  24. fourth()
  25. fifth()
  26.  
  27.  
  28.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement