A

Admin • 833K Points
Coach

Q. What will be the output of the following Python code: print('Hello' * 3)?

  • (A) HelloHelloHello
  • (B) Hello 3
  • (C) Hello
  • (D) Error
  • Correct Answer - Option(A)
  • Views: 24
  • Filed under category Python
  • Hashtags:

Explanation by: Admin

In Python, multiplying a string by a number repeats the string that many times. So 'Hello' * 3 will output 'HelloHelloHello'.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.