How to simplify this function?

How can I simplify(write correctly) this function in python 3?
def calculate_checksum(param):
 A = 1 
 while A < len(param):
 for B in range(len(param)-A):
 if param[B] < param[B+1]:
 param[B], param[B+1] = param[B+1],param[B]
 A += 1
June 10th 19 at 16:21
1 answer
June 10th 19 at 16:23
Solution
Some kind of crap.
def calculate_checksum(param):
 param.sort(reverse=True)

Find more questions by tags Python