Python - Variables and Dynamic Typing
Find the error in this code snippet:
my_var = 'hello'
if type(my_var) == str:
print('It is a string')my_var = 'hello'
if type(my_var) == str:
print('It is a string')print is not indented, causing an indentation error.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions