python3: 'where' keyword

Andrey Tatarinov elephantum at
Sun Jan 9 06:01:03 EST 2005

Peter Hansen wrote:
>>  >>> print words[3], words[5] where:
>>  >>>     words = input.split()
>> - defining variables in "where" block would restrict their visibility 
>> to one expression
> Then your example above doesn't work...  print takes a
> sequence of expressions, not a tuple as you seem to think.

sorry, I used "expression" carelessly.

I mean that
 >>> print words[3], words[5]
is a single expression
(and that would be in Python 3, when print would be subtituted with 

More information about the Python-list mailing list