Python:字符串功能及应用
摘要:
# 字符串独有功能 # 1、startswith 判断以xxx开头 a = '奥特曼打怪兽' b = a.startswith('奥特曼') print(b) # 输出True # 2、endswith 判断以xxx结尾 b = a.endswith('怪兽') print(b) # 输出True 阅读全文
posted @ 2021-09-29 17:33 小尹学python 阅读(129) 评论(0) 推荐(0)
浙公网安备 33010602011771号