Advertisement
go6odn28

matrix_3d

Nov 27th, 2023
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.45 KB | None | 0 0
  1. matrix_3d = [
  2.     [
  3.         [1, 2, 3, 4],
  4.         [5, 6, 7, 8]
  5.     ],
  6.     [
  7.         [9, 10, 11, 12],
  8.         [13, 14, 15, 16]
  9.     ]
  10. ]
  11.  
  12. print(matrix_3d[0])
  13. print(matrix_3d[0][0])
  14. print(matrix_3d[0][0][0])
  15. print(matrix_3d[1])
  16. print(matrix_3d[1][0])
  17. print(matrix_3d[1][1])
  18. print(matrix_3d[1][1][0])
  19.  
  20.  
  21. Output:
  22. [[1, 2, 3, 4], [5, 6, 7, 8]]
  23. # [1, 2, 3, 4]
  24. # 1
  25. # [[9, 10, 11, 12], [13, 14, 15, 16]]
  26. # [9, 10, 11, 12]
  27. # [13, 14, 15, 16]
  28. # 13
  29.  
  30.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement