💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
len():返回序列长度 \>>> len("hello") 5 \>>> m=len("hello") \#序列长度返回的是一个数字,可以将它赋值给变量,从而输出出来 \>>> m 5 \>>> +:连接两个序列 \*:重复序列元素 \>>> a 'hello' \>>> a\*3 'hellohellohello' \>>> in: 判断元素是否在序列中,返回值为true或false \>>> "e" in "hello" True \>>> "a" in "hello " False max():返回最大值 \>>> max("12379468") \#返回最大数 '9' \>>> max("abcd") \#返回最大字母 'd' \>>> mix() :返回最小值 cmp(strl1,strl2):比较两个字符串是否相同 #python3 取消这一函数 Ascall码值转换 \>>> ord("a") 97 \>>> chr(65) 'A' \>>>