some problems for an introductory python test
Greg Ewing
greg.ewing at canterbury.ac.nz
Wed Aug 11 04:41:35 EDT 2021
On 11/08/21 3:22 pm, Terry Reedy wrote:
> Python is a little looser about whitespace than one might expect from
> reading 'normal' code when the result is unambiguous in that it cannot
> really mean anything other than what it does.
>
> >>> if3: print('yes!')
> yes!
That may not be doing what you think it's doing. Consider also
>>> if0: print('yes!')
yes!
--
Greg
More information about the Python-list
mailing list