all versions of python fail to indent after conditional statement
Russell
rustbuckett at pm.me
Sat Apr 10 16:29:22 EDT 2021
I would recommend reading a book that introduces and explains Python
rather than just diving in. I'm been enjoying "Introducing Python:
Modern Computing in Simple Packages" which can be found at
https://amzn.com/1492051365. It started from the beginning and would
answer the questions/difficulties you've raised here. It would help set
you on your quest to master Python.
mikedianeterry at gmail.com wrote:
>
>
> The following snap shot of system prompt illustrates my problem. I have
> tried 3.8, 3.92 and 3.10 with the same result. When I run in the window
> interface it doesn't even display one row of ... but does print if I hit
> return twice. I'm new to Python and was excited about learning it but am
> becoming very frustrated over a bug in such a simple conditional statement
> - please help as I would really like to master Python.
>
> Regards,
>
> Michael Terry
>
>
>
> Microsoft Windows [Version 10.0.19041.867]
>
> (c) 2020 Microsoft Corporation. All rights reserved.
>
> C:\WINDOWS\system32>py
>
>
>
> Python 3.8.8 (tags/v3.8.8:024d805, Feb 19 2021, 13:18:16) [MSC v.1928 64
> bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for
> more information.
>
>
>
> >>> dog_has_fleas=True
>
> >>> if dog_has_fleas:
>
> ... print('too bad')
>
> File "<stdin>", line 2
>
> print('too bad')
>
> ^
>
> IndentationError: expected an indented block
>
> >>> Microsoft Windows [Version 10.0.19041.867]
>
>
>
>
>
> Sent from [1]Mail for Windows 10
>
>
>
> References
>
> Visible links
> 1. https://go.microsoft.com/fwlink/?LinkId=550986
--
rust
0x68caecc97f6a90122e51c0692c88d9cb6b58a3dc
More information about the Python-list
mailing list