Guest User

Untitled

a guest
Mar 18th, 2018
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. # f = open("1.txt", "w")
  2. #
  3. # f.write("Hello, world!")
  4. #
  5. # f.close()
  6.  
  7. # f = open("1.txt")
  8. #
  9. # print(f.read())
  10. #
  11.  
  12. # f.close()
  13.  
  14. # matr = []
  15. # with open("1.txt") as f:
  16. # n = f.read().split("\n")
  17. # for i in n:
  18. # m = i.split(" ")
  19. # m = list(map(int, m))
  20. # matr.append(m)
  21. #
  22. # for i in matr:
  23. # for j in i:
  24. # print(j**2, end=" ")
  25. # print()
  26.  
  27.  
  28. matr = []
  29. with open("1.txt") as f:
  30. matr = [list(map(int, i.split(" "))) for i in f.read().split("\n")]
  31.  
  32. for i in matr:
  33. for j in i:
  34. print(j**2, end=" ")
  35. print()
  36.  
  37. m = [1,2,3,4,5,6]
  38.  
  39.  
  40. print(list(map(, m)))
  41. #9, 10 перед изучением ооп
Add Comment
Please, Sign In to add comment