hi, i was interested if perl is still relevant in this day and age. Perl has been on the decline for a very long time now. Perl 6 (now named 'raku) not being backwards compatible with perl 5 code made the already small perl community even smaller by splitting it in half. A good example is lisp with it’s thousands of different dialects.
Is it still worth using or is it bound to legacy software forever? Like cobol.
Sometimes I want to write a quick oneliner or a quick algorithm to test things out. Or not worry about indentation when trying a solution I might discard in five minutes.
With Python, I don’t have that choice.
If it is actually a single line ID argue that you do.
Single line ID? What do you mean?
Edit: I got it now.
So I can place multiple for loops and conditional statements in one single line in Python?
I think it’s an autocorrect typo. Should be: If it is actually a single line, I’d argue that you do.
Thanks.
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”.