Re: Python Golf

2023-11-07 Thread Jon Ribbens via Python-list
On 2023-11-07, wrote: > Discussions like this feel a bit silly after a while. How long > something is to type on a command line is not a major issue and > brevity can lead to being hard to remember too especially using > obscure references. Of course it's silly, that's why it's called "golf"!

RE: Python Golf

2023-11-07 Thread AVI GROSS via Python-list
python.org Subject: Re: Python Golf On 2023-11-07, Stefan Ram wrote: > I read this in a shell newsgroup: > > perl -anE '$s += $F[1]; END {say $s}' in > > , so I wrote > > py -c "import sys; print(sum(int(F.split()[1])for F in sys.stdin))" > to show that this

Re: Python Golf

2023-11-07 Thread Jon Ribbens via Python-list
On 2023-11-07, Stefan Ram wrote: > I read this in a shell newsgroup: > > perl -anE '$s += $F[1]; END {say $s}' in > > , so I wrote > > py -c "import sys; print(sum(int(F.split()[1])for F in sys.stdin))" > to show that this is possible with Python too. > > But now people complain that