Advertisement
Guest User

Untitled

a guest
Mar 29th, 2015
235
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. 1 4 9
  2. 16 25 36
  3. 49 64 81
  4.  
  5. n=[]
  6. dane = open("num.txt", "r")
  7.  
  8. for i in dane:
  9. i = i.replace('n','')
  10. for j in i.split(' '):
  11. j = int(j)
  12. j = j**2
  13. n.append(j)
  14.  
  15. nowy = open("newnum.txt","w")
  16. nowy.write(str(n))
  17. nowy.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement