Answer the question
In order to leave comments, you need to log in
How to interact with characters if they are in a text notepad?
I want to interact with numbers that are written in a standard text editor - notepad.
Let's say I want to multiply a number by 200 by 2, then it turns out not 400 as usual, but 200200. How can I fix it so that I can work with numbers normally?
here is the code:
file = open(file="testtext.txt") #в файле написано число 200
file1 = file.read()
print(file1)
print(file1*2)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question