20230902
py之路——day14-20230902:python内置方法
作者:zb 1、python内置方法: abs()方法:取绝对值 all()方法:all(iterable),如果iterable中的所有元素都为空或True,则返回True,否则返回False # all()方法 print(all([0, 1, -2])) print(all([1, 1, 2] ......
Python初级学习20230902——字符串
# 字符串 ```python """ example05 - 字符串 1.转义问题 2.字符编码 Author: danlis Date: 2023/9/2 """ a = 'hello, world' # 和a一样的 b = "hello, world" # 一般长字符串,用三个单引号。三个双引 ......
Python初级学习20230902——元组
""" example04 - 初步学习Python 1.学习元组tuple 2.元组的应用 Author: danlis Date: 2023/9/2 """ # START1 学习元组tuple # 元组是不可变的容器* # str = (100) # 这实际上class 'int',所以如果需 ......