Problem

6 /13


String addition and multiplication

Theory Click to read/hide

Addition and multiplication of strings

Strings can be added, for this the sign "+" is used. This operation is called string concatenation or concatenation
 
Example 
s = "Hello,"
s1 = "world"
print(s + s1)
The screen will display the phrase "Hello world" (without quotes).

Python implements the operation of multiplying a string by a number: it replaces multiple addition.
 
Example 
string
s = "world "+"world "+"world "+"world "
can be replaced by  
s = "world " *4

Problem

The first line is the username.
Display:
1) in the first line - a greeting to the user in the form "Hello, name!" (without quotes)
2) in the second line - print the username 10 times separated by a space.