Q. What does ‘Hello {0}’.format(‘Python’) output?

A
Hello 0
B
Hello Python
C
Hello {0}
D
Error
Solution:

.format(‘Python’) replaces {0} with ‘Python’, outputting ‘Hello Python’.

Entri Contact Image

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