top of page

Typecasting in Python

Updated: Apr 19, 2023

The data type of a variable can be changed to another using the corresponding datatype.



a = int(2)
b = str(a)
print(a)
print("A"+b)

The link to the Github repository is here .

Subscribe to get all the updates

© 2025 Metric Coders. All Rights Reserved

bottom of page