username = input()
while True:
myorder = input()
if myorder.startswith('@'):
print(myorder + ' ' + username + '.' )
If you put your name in username
and @Hi
in myorder
, @Hi name.
will be like '@Hi name.'
even if you put @Hi
into the input, isn't there any printed?
print(myorder + ' ' + username + '.' )
You can change the code above as below.
print(myorder[1:] + ' ' + username + '.' )
Please refer to the code below and the result.
username = input()
while True:
myorder = input()
if myorder.startswith('@'):
print(myorder[1:] + ' ' + username + '.' )
© 2024 OneMinuteCode. All rights reserved.