How to concatenate strings

 First = 'John'

Last = 'Smith'

message = First + ' [' + Last + '] ' + 'is a coder'

msg = f'{First} [{Last}] is a coder'

print(message)

print(msg)

# f represents format
# printing message will be difficult to visualize so we used format option
#First and Last are put in curly brackets while using f option

Comments

Popular posts from this blog

Guess game!

Path for chromedriver