01 Python Basics
01 Python Basics
01 Python Basics
Facts
Meet Creator of Python: Guido van Rossum
22-10-2018 2
What is Python?
• An interpreted, Multi Purpose, object-oriented programming language
similar to PERL
• Said to be relatively easy to learn.
• Extremely attractive in the field of Rapid Application Development.
• Python 1.0 was released in 1994.
• Supports the use of modules and packages
22-10-2018 3
Why do people use Python?
• Readable and Maintainable Code
• Multiple Programming Paradigms
• Object oriented
• Structured programming
• Dynamic type system
• Automatic Memory Management
• Compatible with Major Platforms and Systems
• Robust Standard Library
• Many Open Source Frameworks and Tools
• Django, Flask, Pyramid, Bottle and Cherrypy
• PyQT, PyJs, PyGUI, Kivy, PyGTK and WxPython
4
Quotes about Python
• Python is used successfully in thousands of real-world business applications
around the world, including many large and mission critical systems.
• Here are some quotes from happy Python users:
• YouTube.com
• "Python is fast enough for our site and allows us to produce maintainable features in record
times, with a minimum of developers," said Cuong Do, Software Architect, YouTube.com.
• Google
• "Python has been an important part of Google since the beginning, and remains so as the system
grows and evolves. Today dozens of Google engineers use Python, and we're looking for more
people with skills in this language." said Peter Norvig, director of search quality at Google, Inc.
• https://www.brainyquote.com/topics/python-quotes
• https://avilpage.com/2014/12/14-great-quotes-about-python.html
5
Python History
6
ABC
• The history of Python starts with ABC.
• Rather than having all of its functionality built into its core, Python was
designed to be highly extensible.
22-10-2018 10
What’s Python good for?
• Web Development
• Python has a large selection of pre-built libraries for just about anything.
• Python code takes less time to write due to its simple and clean syntax.
• Python has a built-in framework for unit tests.
• Internet of Things
• Python’s close relation to scientific computing has allowed it to gain ground in IoT
development
• Python is the language of choice for the Raspberry Pi.
• Python offers tools that streamline the IoT development process, such as webrepl
• Since Python is an interpreted language, you can easily test your solution without
compiling the code or flashing the device
• AWS offers a Python SDK for AWS IoT.
11
What’s Python good for
• Machine Learning
• Data Analytics
• Network Automation
12
What’s Python not good for?
• Speed
• Mobile Development
• Large Memory Consumption
13
The features list
• Easy to Learn and Use
• Expressive Language: More understandable and readable.
• Interpreted Language: Makes debugging easy and suitable for beginners
• Cross-platform Language
• Free and Open Source
• Object-Oriented Language
• Large Standard Library
14
Python Portability
• Python has excellent portability.
• It runs on many Unix variants, on the Mac, and on Windows 2000 and later.
• Can write one script and run it seemlessly on Windows, Linux and MacOSX.
15
Using the Python Interpreter
• Invoking the Interpreter
• Installed as /usr/local/bin/python3.x
• python3.8
• python
• To exit:
• Typing Control-D on Unix
• Type Control-Z on Windows
• quit()
• Run python script:
• python demo.py
16
Comments in Python
• # This is a comment
17
Python Variable Types with Examples
18
Thanks
22-10-2018 19