摘要:
age_of_princal = 56guess_age = int(input("e guess a age:"))if guess_age == age_of_princal: print("Bingo,you are right")else: print("No,you are wrong") 阅读全文
摘要:
+号可以用来做字符串拼接 print("abc"+"efg"+"def") abcefgdef 字符串(str)与数字(int)不能使用+进行拼接 阅读全文
摘要:
input:与用户的交互,返回用户输入的值 注意:input接受的所有数据都为字符串,即便输入的为数字,依然会被当成字符串 阅读全文
摘要:
str(string): 字符串 str(被转换的数据) int(interger):整数 int(被转换的数据) 阅读全文