Q. What is the output of print(‘x’ * 3)?

A
xxx
B
x x x
C
3
D
Error
Solution:

The * operator repeats the string, so ‘x’ * 3 outputs ‘xxx’.

Entri Contact Image

Get Expert Advice for Free: Register for Your Free Consultation Now!

    [honeypot honeypot-100]