T
T
todoman2021-06-25 19:56:19
Python
todoman, 2021-06-25 19:56:19

How to remove space in print string in Python?

There is a code:
name = input("What is your name?")
print("Hi,", name,"!")

When it is executed, after entering Dima's name (for example), the phrase "Hi, Dima!"

How to remove the space between a word and an exclamation mark? There is no space in the code.

Thanks in advance, I always choose Answer-solution.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladislav Mukhin, 2021-06-25
@todoman

name = input("Как вас зовут? ")
print(f'Привет, {name}!')

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question