PYTHON

 PYTHON

What is Python?


Python is an interpreted high-level general-purpose programming language. Python's design philosophy emphasizes code readability with its notable use of significant indentation. Its language constructs as well as its object-oriented approach aim to help programmers write clear, logical code for small and large-scale projects.

Python is dynamically typed and garbage-collected. It supports multiple programming paradigms, including structured (particularly, procedural), object-oriented and functional programming. Python is often described as a "batteries included" language due to its comprehensive standard library.


Python consistently ranks as one of the most popular programming languages. It is used for:

  • web development (server-side),
  • software development,
  • mathematics,
  • system scripting.




 Guido van Rossum 
 
Guido van Rossum began working on Python in the late 1980s, as a successor to the ABC programming language, and first released it in 1991 as Python 0.9.0. Python 2.0 was released in 2000 and introduced new features, such as list comprehensions and a garbage collection system using reference counting. Python 3.0 was released in 2008 and was a major revision of the language that is not completely backward-compatible and much Python 2 code does not run unmodified on Python 3. Python 2 discontinued with version 2.7.18 in 2020.Python 3.9.0 is the newest major release of the Python programming language, and it contains many new features and optimizations.

Python 3.9.0


This is the first version of Python to default to the 64-bit installer on Windows. The installer now also actively disallows installation on Windows 7. Python 3.9 is incompatible with this unsupported version of Windows.

Major new features of the 3.9 series, compared to 3.8

Some of the new major new features and changes in Python 3.9 are:

  • PEP 573, Module State Access from C Extension Methods
  • PEP 584, Union Operators in dict
  • PEP 585, Type Hinting Generics In Standard Collections
  • PEP 593, Flexible function and variable annotations
  • PEP 602, Python adopts a stable annual release cadence
  • PEP 614, Relaxing Grammar Restrictions On Decorators
  • PEP 615, Support for the IANA Time Zone Database in the Standard Library
  • PEP 616, String methods to remove prefixes and suffixes
  • PEP 617, New PEG parser for CPython
  • BPO 38379, garbage collection does not block on resurrected objects;
You can learn more about the update here.


What can Python do?


  • Python can be used alongside software to create workflows.
  • Python can be used on a server to create web applications.
  • Python can connect to database systems. It can also read and modify files.
  • Python can be used for rapid prototyping or production-ready software development.
  • Python can be used to handle big data and perform complex mathematics.

Why Python?


  • Python has a simple syntax similar to the English language.
  • Python works on different platforms (Windows, Mac, Linux, Raspberry Pi, etc).
  • Python has a syntax that allows developers to write programs with fewer lines than some other programming languages.
  • Python can be treated procedurally, in an object-oriented way, or in a functional way.
  • Python runs on an interpreter system, meaning that code can be executed as soon as it is written. This means that prototyping can be very quick.
It is possible to write Python in an Integrated Development Environment, such as Thonny, Pycharm, Netbeans, or Eclipse which are particularly useful when managing larger collections of Python files.


Python Syntax compared to other programming languages


  • Python uses new lines to complete a command, as opposed to other programming languages which often use semicolons or parentheses.
  • Python was designed for readability and has some similarities to the English language with influence from mathematics.
  • Python relies on indentation, using whitespace, to define scope; such as the scope of loops, functions, and classes. Other programming languages often use curly brackets for this purpose.

'Link for official python.org page'

Best places to learn Pyhton for free in 2021


Programming examples


Hello world program:

print('Hello, world!')

Program to calculate the factorial of a positive integer:

n = int(input('Type a number, and its factorial will be printed: '))

if n < 0:
    raise ValueError('You must enter a non negative integer')

factorial = 1
for i in range(2, n + 1):
    factorial *= i

print(factorial)



 “Any fool can write code that a computer can   understand. Good programmers write code that   humans can understand.” – Martin Fowler 

Post a Comment

Previous Post Next Post