标签:用户 put %s 交互 print code color class 数字
1 # Aduthor:CCIP-Ma 2 name = input("name:") 3 name2 = name 4 name = "ccip-ma" 5 age = int(input("age:")) 6 print("My name is ",name,name2) 7 info = """ 8 ------info of %s------ 9 name: %s 10 age: %d 11 """ %(name,name,age) 12 print(info)
1、int(input("age:"))数字整形;
2、%d数字,%s字符串
标签:用户 put %s 交互 print code color class 数字
原文地址:https://www.cnblogs.com/ccip-ma/p/12019470.html