Why not allow empty code blocks?
Chris Angelico
rosuav at gmail.com
Sat Jul 30 08:47:19 EDT 2016
On Sat, Jul 30, 2016 at 10:39 PM, BartC <bc at freeuk.com> wrote:
> On 30/07/2016 13:22, Chris Angelico wrote:
>
>>>>> print(*range(10), sep='\n')
>>
>> 0
>> 1
>> 2
>> 3
>> 4
>> 5
>> 6
>> 7
>> 8
>> 9
>>>>>
>>>>>
>>
>> Beat that, print statement.
>
>
> for i in range(10): print i
>
> Same number of characters, but a lot less punctuation!
So, no improvement - exactly equal. And no longer a single expression,
ergo no longer valid in as many contexts. (Also, it requires the use
and damage of some iterator variable, which may be significant in some
contexts.)
ChrisA
More information about the Python-list
mailing list