New to Python, need alternative self-teaching books

I’m a very new beginner to Python and I’m attempting to follow a book as a means of learning python in my spare time from work. The book in question is Andrew Park’s Python Programing for beginners 2022. The following output is what I get when I attempt to start the IDLE using the command $ python.

Python 3.10.7 (tags/v3.10.7:6cc6b13, Sep  5 2022, 14:08:36) [MSC v.1933 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> $ python
  File "<stdin>", line 1
    $ python
    ^
SyntaxError: invalid syntax
>>>

The book claims that after the above is done, a new line will appear after the enter or return key has been pressed.
At the moment I’m tempted to continue using the book, but I’m honestly thinking of returning it, as it’s very much not for total beginners, like myself.

How did you get that window to open in the first place? Did you click an icon or run some program?

Python is already running at that point. The string $ python is supposed to represent you starting from a shell prompt (the dollar sign) and typing the command python.

But you’re not typing that in a shell, you’re typing it in an already running python. The three greater than signs (>>>) show that.

So just skip that step and continue. You’re running python already. It will probably have you try some other commands. If they start with >>>, don’t type them. They just represent the prompt you see.

>>> s = "a quoted string"
>>> s.upper()
'A QUOTED STRING'
3 Likes

As an alternative / complement to beginners’ books on Python, I recommend the official tutorial.

If you installed python on Windows with the py launcher (highly recommended!!!) and are in Windows Command Prompt and have a prompt such as this: C:\Users\Terry>, enter py -m idlelib to start IDLE. You will then get a >>> prompt and should enter a Python statement, not a system command.