77
Python f-string quiz (fstrings.wtf)
you are viewing a single comment's thread
view the rest of the comments
[-] sugar_in_your_tea@sh.itjust.works 14 points 1 month ago* (last edited 1 month ago)

Hmm: 17/26

Failures were:

  • didn't know about the = option, but once I saw it once, I guessed right a few times
  • never used ^ in Python, and didn't make the connection to XOR (I figured I'd need the math library or something)
  • the r and a with =! (again, never used = option)
  • edge cases in walrus operator and other things unrelated to f-strings

Most of those I missed (and many I got) I'd reject a PR over because it's not obvious enough what's going on. But I think given that, I did reasonably well.

But I learned something. Thanks for the post!

this post was submitted on 26 Jul 2025
77 points (97.5% liked)

Python

7406 readers
1 users here now

Welcome to the Python community on the programming.dev Lemmy instance!

📅 Events

PastNovember 2023

October 2023

July 2023

August 2023

September 2023

🐍 Python project:
💓 Python Community:
✨ Python Ecosystem:
🌌 Fediverse
Communities
Projects
Feeds

founded 2 years ago
MODERATORS