问题遇到的现象和发生背景 python中这种print怎么竖着实现 不想用多个print的话
类似这样
First name:
Last name:
Age:
Location:
用代码块功能插入代码,请勿粘贴截图
a = input("Please write down your first name:")
b = input("Please write down your last name:")
c = input("Please write down your age:")
d = input("Please write down your location:")
print("First name:",a,"Last name:",b,"Age:",c,"Location:",d)
初步尝试
a = input("Please write down your first name:")
b = input("Please write down your last name:")
print("First name",a /
"Last name",b)
结果会出现
TypeError: unsupported operand type(s) for /: 'str' and 'str'
可是我的print里的数据都是字符串,不理解