摘要:
# find("str") 查找字符串str在查找序列中的哪一个位置,0开始数 s = "2你好啊,我叫周润发" # print(s.find("周润发")) # s1 = s.find("你") # print(s1) print("周" in s) # 判断周杰伦是不是在s字符串中结果False 阅读全文
posted @ 2022-05-06 14:31
acwecc
阅读(87)
评论(0)
推荐(0)
摘要:
# strip()【函数的使用,作用去掉字符串,左右两端的空格、空白符(\t)、换行符(\n)】 # 例:目的做一个登录判断,要求用户输入两端有空格的内容能够自动去除 # username = input("请输入用户名:").strip() # password = input("请输入密码:") 阅读全文
posted @ 2022-05-06 08:58
acwecc
阅读(54)
评论(0)
推荐(0)

""" (按照重要程度及难易程度打星) int,float,bool (**) str (*****) list (*****) tuple (**) set (*) dict (*****) bytes (****) 运算符 (***) 文件操作 (*****) """
浙公网安备 33010602011771号