name=input("name:")
age=int(input("age:"))
print(type(age))
job=input("job:")
infoo=‘‘‘
---------infoo of %s-------
#name:%s
age:%d
job:%s
‘‘‘%(name,name,age,job)
print(infoo)
infoo=‘‘‘
---------infoo of {0}-------
name:{0}
age:{1}
job:{2}
‘‘‘.format(name,age,job)
print(infoo)
info=‘‘‘
---------infoo of {_name}-------
name:{_name}
age:{_age}
job:{_job}
‘‘‘.format(_name=name,
_age=age,
_job=job)
print(info)
原文地址:http://blog.51cto.com/12992048/2172965
时间: 2024-10-10 14:56:28