- By various means Python is
- The fastest growing major programming language
- Python can be used to develop
- Command line/Terminal applications
- Desktop Application
- Web Applications
- Most widely used language in AI/ML/Data Science
- Python is a general-purpose high level language and its design makes it readable.
- Python has a large number of reusable libraries called as packages developed.
- Python standard installation is just around 27 mb.
Moment of Zen
- Each computing language has its own style. Python has a bit of free verses that express python philosophy which are known as zen of python
- Python is an open source project.
- New features to the python are added. Python community, to add these new feature will look at PEP (Python Enhancement Proposal).
- Refer Here
- Python language has lot of interpreters
- Python (CPython)
- The version which is popular and which we have install in Python implemented in C (CPython)
Python Data: Types, Values, Variables and Names
- Under the hood everything in your computer is a sequence of bits.
- To solve the computing problems/business problems we would be building applications and to do this we need to deal with data of various sizes and types (number, text)
- In python, every data is an object and object contains at least the following
- A type
- A unique id to distinguish it from objects
- A value consistent with the type
- Lets look at some of the basic data types in python
|Integer||int||no||25,26, 11, 12|
|Floating point||float||no||3.14, 2.7e5|
|Text String||str||no||‘iphone’ "Android"|
- Mutable or immutable is whether the data value contained in the memory location can be changed (mutable) or not (immutable)
- In python variables are names not places.
Introduction to Python Interactive Interpreter
- Launch any terminal (Powershell/Terminal) and type python and hit enter
- Interactive python will be open and here you can evaluate the python statements
- This interactive python will do REPL (Read, Evaluate, Print, Loop)
- In any programming language, the compiler/interpreter reservers certain words, We cannot use the reserved words for naming varibles, functions, classes
- Python lets us define variables and since python is a dynamic language while defining variables, we need not specify types.
- Depending on values passed to the variable, python interpreter will choose a type