Looking to find max from the combine list as follows:
max
[\'filename1\', 1696, \'filename2\', 5809,....]
I have tried following:<
You can also use try...except clause.
try...except
lst = ['filename1', 1696, 'filename2', 5809] numbers = [] for item in lst: try: numbers.append(int(item)) except ValueError: pass # Ignore items which are not numbers print(max(numbers)) # 5809