摘要:
提示错误为: TypeError: '>=' not supported between instances of 'str' and 'int' 因为 input 接收到的都是字符串类型,解决方案是转变字符类型。 score=int(input ("请输入你的成绩:"))if score >= 9 阅读全文
摘要:
name = 'The Apple'print(name.capitalize()) #把字符串首字母大写print(name.center(100,'-')) #把字符串居中的print(name.index('p'))#找不到下标的时候会报错print(name.isalnum()) #只能有英 阅读全文