What will be the output of the following python code? tp=(5) ; tp1=tp*2 ; print(len(tp1)) **** (Consider semicolon as a next line for coding)*** *
0
2
1
error
Answers
Answered by
3
Answer:
error
Explanation:
1.tp and tp1 are int value so we cant find len for int data type.
Answered by
2
len() function can't be used on tp1
Explanation:
tp = (5)
tp1 = tp*2
print(len(tp1))
- Since tp is an integer so tp1 is also an Integer
- Hence, len() function can't be used on tp1
- Thus, it will lead to an error
Similar questions