Formatting list into a string in Python

 

tup = ("Abdur", 35, "coder", 4.5)
scr = "Hi this is %s aged %s. I am %s by profession and i have %s years of work experience."
print(scr % tup)


Comments

Popular posts from this blog

Quotation marks to wrap an element in HTML

Making GUI Calculator in Tkinter Python

Unlocking Web Design: A Guide to Mastering CSS Layout Modes