Oct-15-2020, 05:52 PM
(Oct-15-2020, 05:38 PM)Shishi Wrote: it says this: <built-in method read of _io.TextIOWrapper object at 0x0170B5B0>
it dosn't says the number
Right, that is exactly the problem. I suggest you review some of the python documentation for working with files, but in short your problem is that you haven't read anything from the file you opened. The variable r is assigned to the TextIOWrapper object you created by opening the file. If you want to read something from the file, you need to use file.read() similar to the way you've used file.write() to write to files. Assign what you read to a variable, and *that* is what you want to compare to "15" or "20".