Learn Python: string
name = input('What is your name?\n')
age = input('How old are you?\n')
location = input('Where are you from?\n')
hobby = input('What do you like?\n')
result = 'Hello {}, age of {}, from {}, and you like {}.'
output = result.format(name, age, location, hobby)
print(output)
#或者
#print('Hello {}, age of {}, from {}, and you like {}.'.format(name, age, location, hobby))

浙公网安备 33010602011771号