标签:ext nbsp 身高 格式化字符串 height sage 字符 应用 end
# msg ="我叫太阳, 今年29 身高162"
# print(message)
# name = input(‘请输入姓名:‘)
# age =input(‘请输入年龄: ‘)
# height =input(‘请输入身高: ‘)
# msg ="我叫%s 今年%s 身高%s" % (name,age,height)
# print(msg)
# """
# Name = input(‘请输入姓名:‘)
# Age =input(‘请输入年龄: ‘)
# job =input(‘请输入工作: ‘)
# Hobbie=input(‘你的爱好: ‘)
# msg = ‘‘‘——————info of %s——————
# Name :%s
# Age :%d
# job :%s
# Hobbie:%s
# ————————end——————————‘‘‘% (Name,Name,int(Age),job,Hobbie)
# print(msg)
# """
name = input(‘请输入姓名:‘)
age =int(input(‘请输入年龄: ‘))
height =input(‘请输入身高: ‘)
msg ="我叫%s 今年%s 身高%s,学习进度3%%s" % (name,age,height) #想要格式化输出加一个%,是后面的%
print(msg)
标签:ext nbsp 身高 格式化字符串 height sage 字符 应用 end
原文地址:https://www.cnblogs.com/yuhoucaihong/p/10175236.html