Python 3.5 打印用户输入
Python 3.5 printing user inputs
如何打印输入的答案,例如:
name = input("What is your name?")
print("Nice to meet you %s") % (name)
如果你能回答我,谢谢。
`
print("Nice to meet you "+name)
使用正确的字符串格式:
print("Nice to meet you %s" % name)
或
print("Nice to meet you {}".format(name))
注意格式化是在 print() 函数内部完成的
如何打印输入的答案,例如:
name = input("What is your name?")
print("Nice to meet you %s") % (name)
如果你能回答我,谢谢。
`
print("Nice to meet you "+name)
使用正确的字符串格式:
print("Nice to meet you %s" % name)
或
print("Nice to meet you {}".format(name))
注意格式化是在 print() 函数内部完成的