Explicit type conversion in python part 2

PHOTO EMBED

Wed Aug 02 2023 15:00:52 GMT+0000 (Coordinated Universal Time)

Saved by @pythonHub #python #python-hub #basics

num_str = "10" #it is a string because it is inside quotes
num = 10.1 #it is an float
num_result = int(num_str) + num #telling python that num_str 
#is a number and to add it to num.
print(num_result)
print(type(num_result))
content_copyCOPY