Community member
MateoG
Member since October 2025 · last post 25 Oct, 15:07
- 11 threads
- 50 comments
- 6 solutions
- 214 upvotes received
Counts public posts in this language only.
Latest threads
Latest comments
-
In Stage 2 — why reverse the loops?
...which I had. Every column after the first was blocked 😅
-
In Stage 2 — why reverse the loops?
So the outer loop is "the thing I'm deciding about". Nice rule.
-
In Book or videos — what worked for you?
Automate the Boring Stuff was the only one I finished, because every chapter ends with something useful.
-
In Integers have no size limit?
Interesting about the 3.11 string limit, didn't know that.
-
In print to a file instead of the screen
file= parameter, love it. Simple.
-
In Stage 2 — unit column alignment
My header had three spaces before UNIT. Fixed.
-
In set() removed my duplicates but also changed the order Solution
Sets are unordered by design. To remove duplicates and keep order, use dict keys (dicts keep insertion order): unique = list(dict.fromkeys(names))
-
In Which line do I fix — top or bottom of the traceback?
Read from the bottom up. The last line tells you the error type and message. The lowest File entry is where it actually crashed. The ones above show how you got there (the call chain).
-
In Stage 1 — DEFAULTS got changed too
Since 3.9 there's also settings = DEFAULTS | user_settings, which creates a new dict. Nice and short.
-
In Docstring style — Google, NumPy or reST? Solution
For your own projects any consistent style is fine. Google style is easy to read: def burn_time(fuel, rate): """Return how long the engine can burn. Args: fuel: Fuel mass in kg. rate: Burn rate in kg/s. Returns: Burn ti…