Quick actions

cmd+k|ctrl+k

Navigation

Languages

formatted stirngs 

Snippet info

Language

Python

Visibility

public

Author

sermon0906

Created

2026-06-24T13:25:34.259861Z

Updated

2026-06-24T13:25:34.259861Z

message1 = ' sermon'
age =  20
print('my name is '+ message1 +' and my age is '+ str( age)) #if i dont do type converstion here error will occur here due to stirng concatenation 
#this is here looks not so clean so we use formatted strings 
print(f"my name is {message1} and my age is {age}") #this is in python 3
#now for python 2 
print("my name is {} and my age is {}".format(message1,age))
INFO