Sep-28-2022, 01:25 PM
Just an idea: for every filename which ends with _.csv strip the specific characters, convert to int and find max value:
filenames = ["igMess_2_.csv", "igMess_3_.csv", "igMess_1_.csv", "igMess_5.csv"] max_value = max(int(filename.strip('igMess_.csv')) for filename in filenames if filename.endswith("_.csv")) # max_value would in this example be 3
I'm not 'in'-sane. Indeed, I am so far 'out' of sane that you appear a tiny blip on the distant coast of sanity. Bucky Katt, Get Fuzzy
Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.
Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.