1 name = input("name:") 2 age = input ("age:") 3 job = input ("job") 4 info = ''' 5 _____info in___ %s: 6 name:%s 7 age:%s 8 job:%s 9 ''' %(name,name,age,job) 10 print (info)
通多%s(string)调用对应的函数,实现字符串的格式化
1 name = input("name:") 2 age = input ("age:") 3 job = input ("job") 4 info = ''' 5 _____info in___ %s: 6 name:%s 7 age:%s 8 job:%s 9 ''' %(name,name,age,job) 10 print (info)
通多%s(string)调用对应的函数,实现字符串的格式化