GUIDEDeep 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.

Updated 2026-11-01 · Formula checked

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.

Sources

Related calculators

Python Output: 1000 Gamified Expression and Method Cards1000 Python output cards covering arithmetic, strings, lists, dicts, comprehensions and built-ins, in 50 levels with spaced repetition.

More guides

Hiragana vs KatakanaRead guideSpaced Repetition and the Forgetting CurveRead guideOn Readings vs Kun ReadingsRead guideAn N5 Kanji Study OrderRead guide
KEEP READING

Keep reading

Read in order, or jump to another guide on the same topic.

All guides →

None