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

The Basic Structure of a Full-Stack Web App

Unlocking Web Design: A Guide to Mastering CSS Layout Modes