python notes
-
list
list是一种有序的集合,可以随时添加和删除其中的元素。
len(list) : 统计list中元素个数
list.pop(): 删除list中最后一个元素
list.pop(i) : 删除任意一个index元素
list.insert(i,'xxx') : 任意index插入元素 -
tuple
tuple一旦初始化就不能修改
tuple只有一个元素时要写 t = (1,)
continue用于跳出当前循环
break用于跳出本次循环
Tags:
Python
Revision | Date | Edited by | Changes | Status | |
---|---|---|---|---|---|
2 | 2023-04-27 11:01:31.536721 | alem | 35++ | OK | View |
1 | 2023-03-16 09:43:02.866610 | alem | 178++ | OK | View |
0 | 2023-03-16 07:50:38.699912 | alem | 28++ | OK | View |
All contributions are licensed under Creative Commons, and note is collaboratively edited.
You are welcome to Contribute to this note.
You are welcome to Contribute to this note.