Answers for "Python Practice Problems based on type casting"

0

Python Practice Problems based on type casting

num_int = 123
num_str = "456"

print("Data type of num_int:",type(num_int))
print("Data type of num_str before Type Casting:",type(num_str))

num_str = int(num_str)
print("Data type of num_str after Type Casting:",type(num_str))

num_sum = num_int + num_str

print("Sum of num_int and num_str:",num_sum)
print("Data type of the sum:",type(num_sum))
Posted by: Guest on September-02-2020
0

how to tyoecast in python

example = 1.3234325
print(type(example))
Posted by: Guest on May-10-2020

Code answers related to "Python Practice Problems based on type casting"

Python Answers by Framework

Browse Popular Code Answers by Language