Python - Variables and Dynamic Typing
What is the issue with this Python code?
num = 7 num = num + [3] print(num)
num = 7 num = num + [3] print(num)
num is an integer with value 7.[3] to an integer causes a TypeError because these types cannot be added.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions