this post was submitted on 16 Sep 2024
449 points (97.3% liked)

Programmer Humor

19623 readers
2719 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 1 year ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] calcopiritus@lemmy.world 3 points 2 months ago* (last edited 2 months ago)

Anything that's not an integer or a range doesn't belong inside []. Much more readable to use zip, map, filter, etc. And more powerful.

EDIT: that was meant for indexing lists. Strings inside [] for indexing ducts are fine.