Python's a high-level programming language. Its philosophy provides code readability with the use of significant indentation. Python also features object-oriented programming to help programmers write a lot clear, logically for small and large projects.
The language is dynamically typed and garbage-collected, also supports a lot of programming paradigms, like a structured object-oriented and functional programming. Often python is described as a batteries-included due to its complete standard library.
Python as an ABC programming language successor was being worked on by Guido Van Rossum in the late 1980s.
Releases of Python:
Python 0.9.0 - 1991
Python 2.0 - 2000
Python 3.0 - 2008
Python 2.7.18-2020
Python 2 was comprised of a new type of reliable features such as list comprehension and also a garbage collector system that uses reference counting.
Python 3 was a major revision that wasn't really backward-compatible. Python is still ranked as one of the most popular programming languages.
Syntax:
Python is an easily readable language. Compared to other languages where they use punctuation, python uses English keywords, and also it doesn't use curly brackets.
Indentation
Rather than curly brackets, python uses whitespace to delimit blocks. Indentation comes as an increase after certain statements, a decrease signifies the end of a block in the indention. Python's program visual structure represents the semantic structure of the program.
Statements and control flow:
The assignment statement uses a single equal sign.
If statement executes a block of code which is mainly used with else and elif (a short version of else-if)
While is a statement that executes a book of code as long as the condition is true.
Raise statement is used to raise a specified exception or re-raise a caught exception.
Break statement exits from a loop.
The return statement is used to return a value from a specific function.
Types in python
Bool-Boolean value
Bytes-Sequence of bytes
dict-Associative array
floar-Floating-point number
int-integer
list-has mixed types
NonType-an object which has an absence of a value
Hello World program:
printf("Hello World")
Methods
They are an object attached to an object class.
Syntax:
Instance.methods(argument) is used for normal methods and functions
class.method(instance, argument)- syntactic sugar
Author Quote:
Python is a powerful language which povides extra support for things like AI, Finance, game development, language development, data analytics. Now it depends on how you want use it.
Gabriel Ricardo
Source: