|  | 
 
| 
本帖最后由 少年白马入江湖 于 2021-7-1 17:06 编辑
x
马上注册,结交更多好友,享用更多功能^_^您需要 登录 才可以下载或查看,没有账号?立即注册  
 >>> input = "I love FishC.com"
 >>> print(input)
 I love FishC.com
 >>> x = "I love FishC.com"
 >>> print(x)
 I love FishC.com
 >>> input = "I love FishC.com"
 >>> print(input)
 I love FishC.com
 >>> name = input("请输入你的名字:")
 Traceback (most recent call last):
 File "<pyshell#6>", line 1, in <module>
 name = input("请输入你的名字:")
 TypeError: 'str' object is not callable
 >>>
 第一个input做变量可行啊
 
BIF名可以做变量名,但后续需要使用相应的BIF时,就会发现它是无效的,比如你input = "I love FishC.com"后,想使用input读取用户输入时:u = input("请输入:")就会报错,只有del input后,input才会恢复原有功能。 | 
 |