Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 1 4 9
- 16 25 36
- 49 64 81
- n=[]
- dane = open("num.txt", "r")
- for i in dane:
- i = i.replace('n','')
- for j in i.split(' '):
- j = int(j)
- j = j**2
- n.append(j)
- nowy = open("newnum.txt","w")
- nowy.write(str(n))
- nowy.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement