标签:div for lis str print range lse list else
# 打印1-9的序数 nun_list = list(range(1, 10)) for n in nun_list: if n == 1: print(str(n)+"st") elif n == 2: print(str(n)+"nd") elif n == 3: print(str(n)+"rd") else: print(str(n)+"th")
标签:div for lis str print range lse list else
原文地址:https://www.cnblogs.com/2018jason/p/9352956.html