H13-311_V3.5 · Question #352
The Python language can use multiple statements on the same line, separated by commas ".".
The correct answer is B. False. Option B is correct because Python uses a semicolon (;), not a comma, to separate multiple statements on the same line (e.g., x = 1; y = 2). Commas in Python serve a different purpose - they are used to separate elements in tuples, lists, function arguments, and similar…
Question
The Python language can use multiple statements on the same line, separated by commas ".".
Options
- ATrue
- BFalse
How the community answered
(37 responses)- A27% (10)
- B73% (27)
Explanation
Option B is correct because Python uses a semicolon (;), not a comma, to separate multiple statements on the same line (e.g., x = 1; y = 2). Commas in Python serve a different purpose - they are used to separate elements in tuples, lists, function arguments, and similar constructs, not statements. Option A is a near-miss that tricks students because Python does allow multiple statements per line, but gets the separator character wrong.
Memory tip: Think "Semicolon for Statements" - both start with S. Commas create collections; semicolons connect commands.
Topics
Community Discussion
No community discussion yet for this question.