how do i get round this error then because i have a mixed list of file names and their size i need it sorted by the size and i get errors trying to sort the size on its own because of they way it pairs the file name and the size as it runs though a folder

For example like this, but start new thread and include link to old thread in your message.

list_of_mixup= ['name',123123,'sdfa',342]
iter_list = iter(list_of_mixup)
fine_list = []

while True:
    try:
        no_mix = (next(iter_list),next(iter_list))
    except StopIteration:
        break
    else:
        fine_list.append(no_mix)

print(fine_list)