Python is capable of object oriented programming (and in fact it is designed around the paradigm that everything is an object) but don’t let that worry you; you can write purely functional or procedural programs in it and never worry about methods and abstractions. A Unix shell is just a command line interface and environment with some basic functions, similar to the DOS shell in Windows (except more powerful). If you open a Terminal on macOS, it is giving you a Unix shell (generally the ‘bash’ shell). There are also web-based graphical shells for Python like the Jupyter Notebook which can be quite useful, but it’s an additional thing you have to learn. The IPython shell (installed on macOS by default) is easy enough to start learning with.
I think that is supposed to be some kind of online interpreter that doesn’t seem to be working. Just cut and paste the text into an IPython shell (literally open a Terminal and type ‘ipython’) and the code should work fine. There are online live training options and code camps you can go to, but just following along with some tutorials should get you some familiarity. The fundamentals of Python are as easy to learn as BASIC, and the language is far more functional at even a very primitive level of comprehension.