CBSE Class 11 Computer Science Question 35 of 98

Python Programming Fundamentals — Question 14

Back to all questions
14
Question

Question 14

Which of the following is an invalid statement?

  1. a=b=c=2
  2. a,b,c=10,20,30
  3. abc = 20 30 40
  4. a_b_c=20
Answer

abc = 20 30 40

Reason — In Python, the statement abc = 20 30 40 is invalid because it attempts to assign multiple values (20, 30, and 40) to a single variable (abc) in a single assignment statement.