版权声明:诸葛老刘所有 https://blog.csdn.net/weixin_39791387/article/details/82706403
1988 转为 1980s
year = 1988
# 关键部分
temp = 10 * (year // 10)
years = str(temp) + 's'
print(years)
# '1980s'
1988 转为 1980s
year = 1988
# 关键部分
temp = 10 * (year // 10)
years = str(temp) + 's'
print(years)
# '1980s'