Tiago Montes
banner
setnomt.bsky.social
Tiago Montes
@setnomt.bsky.social
Happy People and Tech Jedi
…”while getting the split parts” was implied. I’ll grant you: explicit is better than implicit, indeed! 😊
November 2, 2025 at 6:05 PM
Reposted by Tiago Montes
Now that the remaining PNG files have been manually OCR'd, the total stands as follows:

We've raised $9238.74 which is 54.3% of our $17000 total. Once again within 24h of a contributor joining the match we are over half full, but we all stand ready to be maxed out so please keep those donations […]
Original post on mastodon.social
mastodon.social
October 31, 2025 at 7:30 PM
str.partition ALWAYS gives you a three-tuple, str.split(…, 1) might return either a 1 or 2 element list.

That’s the key difference.

Also more natural when wanting to check whether the string contains or not the separator, I guess.
October 31, 2025 at 4:00 PM
Interesting… I never thought about that, now that you mention it.
October 31, 2025 at 3:56 PM
…sometimes, str.partition is your friend, too.
October 31, 2025 at 2:49 PM