Q. Which method prints a formatted string using variables?

A
format()
B
print()
C
display()
D
write()
Solution:

format() formats strings with variables, e.g., ‘{} {}’.format(‘a’, ‘b’) = ‘a b’.

Entri Contact Image

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