Familiarization with the basics of Python programming
Python is a widely used high-level programming language for general-purpose programming, created by Guido van Rossum and first released in 1991. Python features a dynamic type system and automatic memory management and supports multiple programming paradigms, including object-oriented, imperative, functional programming, and procedural styles. It has a large and comprehensive standard library.Compared to compiled languages like C, Java, or Fortran, we do not need to declare the type of variables, functions, etc. when we write code in Python. This makes our code short and flexible.
Why we need Python?
We need Python because it is:
- Simple: As comparision to other languages python is like writing simple strict English sentences
- Interpreted: As other languages C,C++,java etc does not require compilation to machine languages, we can directly run Python program from the source code.
- Easy to learn: Due to simple syntax it is easy to learn
- Free and open Source(FOSS): It is freely licensed to use, copy, study and change the software in any way and any where.
- Dynamically typed Languages: A languages is dynamically typed languages if the type of a variable is checked during runtime.
- Cross/Platform Independent: Python programs can work on any of these platforms without requiring any changes at all if we are careful in avoiding any platform-specific dependency.
- Mutiparadigm: Python supports various programming and implementation paradigms, such as Object Oriented, Functional, or Procedural programming.
- Extensive Lirary: Python support huge library. Top 5 Python Libraries are:
- Tensor Flow
- Numpy
- Scipy
- PyTorch
- Pandas
- Garbage collection: Python takes care of memory allocation and deallocation on its own.
Cons of Python
- Speed can be an issue
- Absence from mobile computing and browsers
- Problems with Threading