题目:
list无重复数字,都是从小到大排列为True
链接:
https://py.checkio.org/en/mission/ascending-list/
代码
from typing import Iterable
def is_ascending(items: Iterable[int]) -> bool:
a = items
aa = list(set(a))
b = sorted(a)
if len(aa) != len(a):
r = False
elif b == a:
r = True
else:
r = False
return r
```