Python Forum

Full Version: Help to find the largest int number in a file directory
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi, i am a little bit newbie in programming python. I have this problem:

I want to python give me the max value (integer) of a directory folder, the files are with .txt extension . For example i have this path:
[Image: GcJXNgS.png]

inside the hghg folder there are this files
[Image: Qwz6B5E.png]

I want python give me the highest number of the file without (22)
the result in this case will be 39 because is de highest number but i cant get it

all the codes I tried failed. Can you help me with this task?

Sorry for my english.

regards
What have you as tried and what have you done to try and understand why your attempts didn't work?