Like to use reverse sort in command its: variable.sort(reverse=True) but this is permanent.
The sorted command is only temporary such as: print(sorted(variable)) so how do I make that one in reverse?
Like to use reverse sort in command its: variable.sort(reverse=True) but this is permanent.
The sorted command is only temporary such as: print(sorted(variable)) so how do I make that one in reverse?
sorted(variable, reverse=True)
Use the keyword argument reverse inside the sorted function, and put it to True for it to be reversed
that should do exactly what you want