Old-school way of formatting strings str.format() The Python string .format() method was introduced in version 2.6. Following is an example that uses .format() method of formatting strings. #Example 1 (simple) name = "Sweta Shaw" print("My name is {...

Markdown supported · ⌘↵ to post
Sweta Shaw
Dip Bhattacharjee
JS Developer
Great one for a beginner like me 😅.