Concatenation in Python in 60 seconds or less!


Concatenation is about joining different types of objects in Python together.

Python classes different datatypes inside a print function as objects. Python can’t handle different datatypes (or objects) at one time unless all objects are the same datatype.

We can use the int()function to convert string objects to an integer for example.

x = "16"



and we can also convert integer objects into a string using the str()function like so:

x = "16"

print("Lily is "+str(x))


Series links

Similar Posts

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.