fork(3) download
  1. import numpy as np
  2.  
  3. lista = np.arange(1, 10).reshape(9, 1)
  4. '''
  5. array([[1],
  6. [2],
  7. [3],
  8. [4],
  9. [5],
  10. [6],
  11. [7],
  12. [8],
  13. [9]])
  14. '''
  15. lista = lista.reshape(3, 3)[::-1] # forma-lo em 3 linhas e 3 colunas, e inverter
  16. print(lista)
Success #stdin #stdout 0.18s 24948KB
stdin
Standard input is empty
stdout
[[7 8 9]
 [4 5 6]
 [1 2 3]]