一、数字
int(..)
二、字符串
replace/find/join/strip/startswith/split/upper/lower/format
tempalte = "i am {name}, age : {age}"
# v = tempalte.format(name='alex',age=19)
v = tempalte.format(**{"name": 'alex','age': 19})
print(v)
三、列表
append、extend、insert
索引、切片、循环
四、元组
忽略
索引、切片、循环 以及元素不能被修改
五、字典
get/update/keys/values/items
for,索引

dic = {
"k1": 'v1'
}

v = "k1" in dic
print(v)

v = "v1" in dic.values()
print(v)
六、布尔值
0 1
bool(...)
None "" () [] {} 0 ==> False

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-11-14
  • 2022-12-23
  • 2021-08-30
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-09-10
  • 2021-11-17
  • 2022-12-23
  • 2022-12-23
  • 2022-01-05
  • 2021-11-24
相关资源
相似解决方案