Post

@PythonPr Answer: A) hellohellohello
For beginners:
› "hello" * 3 = "hellohellohello"
› "ab" * 2 = "abab"
› "-" * 10 = "----------"
String multiplication repeats it! Super useful for creating separators, paddings, or patterns. Works with any string and positive integer.
English

@PythonPr Yo Python fam! Let's break this down
The code is:
Copiarx = "hello"
print(x * 3)
So, what's the output? If you guessed A: hellohellohello – you're absolutely right!
Why?
In Python, multiplying a string by an integer repeats the string that many times.
English

@PythonPr A) hellohellohello
String repetition: "hello" * 3 repeats the string three times.
English

@PythonPr x is a string
multiply a string by an integer repeats the string
so the output= hellohellohello
English

@PythonPr A) option because of string concatenation.
English

@PythonPr hellohellohello is the correct
The option A may be but it is mispelled so
not sure
None of the options given ?
English

@PythonPr A because multiplying a string with and integer multiplies string in as many times
English

@PythonPr Selecting any of the above four opinions is incorrect. If you mast choose one, only A is acceptable, but the output is incomplete!
English




























