-2

So i am running this piece of code here:

username='john'
print('Weclome ',(username),'!')

but it keeps putting a space between the username and the exclamation mark. How do I remove it so it just outputs 'Welcome John!'

MattDMo
  • 96,286
  • 20
  • 232
  • 224

2 Answers2

0

Try this instead

username = 'John'
print(f'Welcome {username}!')
prxvidxnce
  • 359
  • 1
  • 9
0

You can use an f-string.

username = "John"
print(f"Welcome {username}!")
MattDMo
  • 96,286
  • 20
  • 232
  • 224