Part 1 - Basic Python
Part 1 - Basic Python#
In order to communicate with a computer we need a language that is understandble by both humans and computers. One popular language to do this is Python (named after the English comedy troupe Monty Python). Python is popular because of it’s english-like phrasing and limited symbols/special characters. The goal of the language designer is to encourage verbosity and clarity. Things should be obvious and simple.
This on-line resource starts with a basic introduction to the language syntax items and demonstrates some of the common patterns that make this language useful and popular. This is not a definitive guide into all that Python has to offer (no book can cover all of that), but it focuses instead on practical skills for using Python to automate data analysis leaving the depth to the reader to investigate.
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. If the implementation is hard to explain, it’s a bad idea. If the implementation is easy to explain, it may be a good idea. Namespaces are one honking great idea – let’s do more of those!