(1)通过键盘输入6个两位整数或0,放入listl列表中打印输出 (2)将列表list1中两位整数xx改为年份19xx,将0改为2000; (3)对列来进行降序排序后再次打印输出
时间: 2024-05-07 10:22:16 浏览: 26
(1)
```python
list1 = []
for i in range(6):
num = input("请输入一个两位整数或0:")
list1.append(num)
print(list1)
```
(2)
```python
for i in range(len(list1)):
if list1[i] != '0':
list1[i] = '19' + list1[i]
else:
list1[i] = '2000'
print(list1)
```
(3)
```python
list1.sort(reverse=True)
print(list1)
```
阅读全文