GUIDE深度 · Deep dive
How to Read Python Output
Output questions ask you to evaluate by Python rules. Check operator precedence, then types (int/str/list), and write the answer in repr form; strings carry quotes and lists/dicts keep literal syntax.
Precedence
** binds tighter than * / // %, which bind tighter than + -.
Comparisons and and/or bind looser than arithmetic.
Types
1/2 is a float; 1//2 is an int.
String + only concatenates strings.
FAQ
Why are strings quoted?
repr includes quotes to distinguish strings from names.
Lists vs tuples?
Lists use []; tuples use (), and one-element tuples need a comma.