21
you are viewing a single comment's thread
view the rest of the comments
[-] amateurcrastinator@lemmy.world 1 points 1 week ago

Ah that makes sense. I have never seen a for loop like that. I only used for in bash, python and fortran and they didn't look like that.

I wonder if for these questions you can ask for clarifications or that's an instant fail. Are you supposed to instantly recognize what they mean? Like with this example what would you have done?

[-] catarina@lemmy.dbzer0.com 2 points 1 week ago

That's Python, by the way. Instead of having to use an index, 'x' is already the element of the list corresponding to each iteration.

[-] amateurcrastinator@lemmy.world 1 points 1 week ago

With python I have the least experience. Well I learned something! Cheers

this post was submitted on 17 Dec 2025
21 points (95.7% liked)

Hacker News

3333 readers
387 users here now

Posts from the RSS Feed of HackerNews.

The feed sometimes contains ads and posts that have been removed by the mod team at HN.

founded 1 year ago
MODERATORS