[Tutor] Beginners question
Alex Kleider
akleider at sonic.net
Tue Mar 31 04:47:43 EDT 2020
>> while True:
>> # get input
>> # if input means quit
>> break # break out of the loop
>> # proceed with whatever you want to do
>
>
> I am 'breaking rules'* here...
>
> The above always looks so untidy to my eye. Could we use the 'walrus
> operator' instead of while True:?
>
> *
> 1 I haven't loaded v3.8 at home, to be able to test for myself.
> 2 'walrus' is likely beyond the OP's level of learning
Agreed, and probably beyond mine as well but I for one would very much
like to see how it could make this look less 'untidy.'
(Follow up question will be how to install p3.8: Ubuntu 18.4LTS,
virtualenvwrapper:
pip install python3.8 ... ????
)
More information about the Tutor
mailing list