Python Philosophy

The Zen of Python, by Tim Peters

	•		Beautiful is better than ugly.
	•		Explicit is better than implicit.
	•		Simple is better than complex.
	•		Complex is better than complicated.
	•		Flat is better than nested.
	•		Sparse is better than dense.
	•		Readability counts.
	•		Special cases aren't special enough to break the rules.
	•		Although practicality beats purity.
	•		Errors should never pass silently.
	•		Unless explicitly silenced.
	•		In the face of ambiguity, refuse the temptation to guess.
	•		There should be one-- and preferably only one --obvious way to do it.
	•		Although that way may not be obvious at first unless you're Dutch.
	•		Now is better than never.
	•		Although never is often better than *right* now.

You can get this list by typing import this into a Python interpreter.

Python3

Python 3 is not backward compatible so Python 2 code must be ported to be used in Python 3.

Everything in Python 3 is an object.

Print was a keyword in Python 2 (it didn't need parentheses) but it is a function in Python 3 so now it needs parentheses.

Python 2 has integers and long integers, Python 3 only has integers.

Python 2 has string types for Unicode, ASCII and APID data. Python 3 only has Unicode for strings and a separate data type for APID data.

The online documentation for Python can be found at docs.python.org and you should familiarise yourself with these.

Installation

In the course, the PyCharm IDE is used, but I am using VS Code so most of this section is not relevant. I also have IDLE installed so I can use that if needed or I could use Jupyter Notebook.