The placeholders can be identified using named indexes {name}, numbered indexes {0}, or even empty placeholders {}.

 #Format Output String by its positions

#The placeholders can be identified using named indexes {name},

numbered indexes {0}, or even empty placeholders {}.


firstname = input("Enter First Name ")

lastname = input("Enter Last Name ")

organization = input("Enter Organization Name ")

print('{0}, {1} works at {2}'.format(firstname, lastname, organization))

print('FirstName {0}, LastName {1} works at {2}'.format(firstname, lastname, organization))

No comments:

Post a Comment

Latest Post

Don’t Sweat It – Chill with Crompton Air Cooler Deals

 ðŸŒž Don’t Sweat It – Chill with Crompton Air Cooler Deals  More Details : https://www.amazon.in/s?k=laptops+under+70000&crid=29QIFPXQYB3...