2024-05-17 04:04:10 发布
网友
这是我的代码:
#这是一个有关旅行的程序 place=['北京天安门','西安兵马俑','香港游乐园','日本秋叶原'] print(place) print(sorted(place)) print(place) place.sorted(reverse=true) print(place)
当我运行代码时,会发生错误。
place.sorted(reverse=true)
或者
sorted(place)
使用第二种方法,我如何给出(reverse=true)?
(reverse=true)
只需使用sorted(place, reverse=True)。
sorted(place, reverse=True)
只需使用
sorted(place, reverse=True)
。相关问题 更多 >
编程相关推荐