this post was submitted on 10 Sep 2023
65 points (93.3% liked)
Technology
57418 readers
6397 users here now
This is a most excellent place for technology news and articles.
Our Rules
- Follow the lemmy.world rules.
- Only tech related content.
- Be excellent to each another!
- Mod approved content bots can post up to 10 articles per day.
- Threads asking for personal tech support may be deleted.
- Politics threads may be removed.
- No memes allowed as posts, OK to post as comments.
- Only approved bots from the list below, to ask if your bot can be added please contact us.
- Check for duplicates before posting, duplicates may be removed
Approved Bots
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
List comprehension can actually do that, yes. This is one of the scripting aspects of python I use most commonly, and is probably one of its best-known features for creating "one liners".
I read about it since I was curious. It seems like you have to craft your code in a certain way for it to be a one-liner. Whereas with many other languages, you don't need to do such a thing. You just put everything in one line and off you go.
Having said that, from a challenge-seeking perspective, writing python oneliners sound fun (I really mean this.)
Absolutely bizarrely incorrect take on like everything you've stated as though it were fact. This is some classic reddit hole-digging and I'm loving it.
You brought me to the middle of the road in an interesting discussion about oneliners and you shove me back to the start. Way to go, buddy.
"Hurr durr u wrong u redditor!!"
Instead of feeling offended, why don't you continue the conversation? Give me some proof that the stuff I read os wrong. Give me some examples, I'm curious!
I'm no offended. It's just weird listening to someone make shut up about something they clearly have no experience with outside of memes, while talking like it's complete fact. It's a strange thing to do.
At this point you're making a lot of assumptions, and you haven't address the main point. Keep going down that red herring. I did a bit of research, I thought my sources were legit. But oh no... instead of continuing a productive discussion, you had to go down the "u suck, meme boy."
I was curious about python, with my reserves, and you're not really helping. I hope you're not a troll; just a fanatic, which is almost as useless as a troll.
I'll give you one last chance. Otherwise, I'll conclude that the python community on lemmy is not that welcoming.