Python error when changing an integer that is string to int type!
Hello! I was coding a database system and put a number say 10000 without any other characters inside a file. Then when I opened it inside code and tried to change it into integer, it give error! Same thing happened with tkinter.
name = input("What is the name of the item? > ")
model = input("What is the model of the item? > ")
cob = input("How much buying it cost? > ")
db.inventory(name, model, cob)
overall_read = open("overall", "r")
overall_write = open("overall", "w")
overall_read_read = overall_read.read()
overall_new_int = int(overall_read_read)
cob_int = int(cob)
overall_new = overall_new_int - cob_int
overall_write.write(str(overall_new))
main()
It should change into integer with value of 10000!