Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Town 1,300,
- Town 2,205,
- Town 3,600,
- Town 4,910,
- Town 5,360,
- f = open("ModifiedPotatoes.txt","w")
- f.close()
- with open("Potatoes.txt","r") as file:
- for line in file:
- info = line.split(",")
- if "Town 2" or "Town 4" in line:
- info[1] -= 20
- with open("ModifiedPotatoes.txt","a"):
- infoStr = "n" + ",".join(str(x) for x in info)
- file.write(infoStr)
- f = open("Potatoes.txt","w")
- f.close()
- with open("ModifedPotatoes.txt","r") as file:
- for line in file:
- with open("Potatoes.txt","a") as potatoesFile:
- potatoesFile.write(line)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement