name = input(‘name:‘)
age = input(‘age:‘)
hometown = input(‘hometown:‘)
profession = input(‘profession:‘)
#通过占位符格式化输出
info = ‘‘‘
-----------info of %s-------------
name: %s
age: %s
hometown: %s
profession: %s
‘‘‘ % (name, name, age, hometown, profession)
print(info)
原文地址:http://blog.51cto.com/8940119/2143377
时间: 2024-10-01 10:09:16