This commit is contained in:
2025-07-03 23:06:09 +08:00
parent 79963351e6
commit da0b3176d7
2 changed files with 25 additions and 0 deletions

15
day4/TODO.py Normal file
View File

@ -0,0 +1,15 @@
list=['原神']
for i in list:
list.append(input('何事?'))
a=input('何事终了?')
if a in list:
list.remove(a)
else:
pass
print('未尽之事:',list)
b = input('是否下一周目(1是2否)')
if b == 1:
continue;
else:
print('未尽之事:',list)
break;

View File

@ -0,0 +1,10 @@
a = ["b",2,3]
a.remove("b")#直接删
del a[0]#删索引值无[]默认整个列表
a.pop(0)#删索引值(用法同上)
a.clear()#清空
a.append(input(""))#添加
a[0]=''#更改第"0"个
a.sort()#按顺序整理
a.reverse()#翻转
len(a)