Skip to content
Advertisement

output error in printing string in python

to print the whole name but only single name is printing.

name = input(raw_input())
print  ('Hello', name,'! You just delved into python.')

Input

Ross
Taylor

Output

Ross

Expected Output

Hello Ross Taylor! You just delved into python.

Advertisement

Answer

You can’t do

name = input(raw_input())

You can either do

name = input()

or

name = raw_input()
User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement