Quick actions

cmd+k|ctrl+k

Navigation

Languages

Formatter String

Snippet info

Language

Python

Visibility

public

Author

arnob

Created

2025-08-26T00:14:45.836975Z

Updated

2025-08-26T00:14:45.836975Z

 #formatted Strings - Dynamic
 
 name = 'John'
 age = 50
 print('Hello ' + name + '. You are ' + str(age) + ' years old') #old Practice
 
 name2 = 'Jon'
 age2 = 60
 print(f 'Hello {name2}. You are {age2} years old') ## works on Python 3.6 and above
 
 name3 = 'hola'
 age3 = 70
 print('hello {1}. you are {0} years old. '.format('hola', '55'))
INFO