Codewars note: Descending Order:降序

My Codewars kyu

Exercise:

 

 

 

Solution:

def descending_order(num):
    return eval(''.join(sorted(str(num), reverse=True)))
def descending_order(num):
    return int(''.join(sorted(str(num), reverse=True)))

 

posted @ 2022-07-05 20:25  大序列  阅读(21)  评论(0编辑  收藏  举报