TypeError occurs while executing Line 2. Give reason. How can it be corrected ? S = (10) # Line 1 print(len(S)) # Line 2*
Answers
Answered by
0
Answer:
S = (10)
means it is an integer variable
we cannot take length is any integer variable
Explanation:
if
S=(10,) # comma indicate it is a tuple
then line will give you output as 1
Similar questions
Computer Science,
1 day ago
Science,
1 day ago
Computer Science,
2 days ago
History,
8 months ago
Psychology,
8 months ago
Math,
8 months ago