Q. What is the output of print(f’Value is {5}’)?

A
Value is {5}
B
Value is 5
C
{5}
D
Error
Solution:

f-string f’Value is {5}’ embeds 5, outputting ‘Value is 5’.

Entri Contact Image

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

    [honeypot honeypot-100]