Python is a high-level general-purpose programming language. Python programs generally are smaller than other programming languages like Java. Programmers have to type relatively less and indentation requirements of the language make them readable all the time.
Note: For more information, refer to Python Programming Language
Introduction to Python3
- Powerful, High-Level and Simple : Python( by Guido van Rossum , National Research Institute for Mathematics and Computer Science) is a powerful high-level programming language. The syntax is extremely simple to read and follow as it has a clean structure. Example: Python 3 has 33 keywords, and Python 2 has 31.
- Interpreted Nature : Programs in many languages may be compiled or interpreted. Python has interpreted nature which means you just type in your code and run it, without the intermediate compilation step. The interpreter executes the program directly, translating each statement into a sequence of one or more subroutines, and then into another language (often machine code).
- Popular Programming Language : It is being rapidly accepted and adapted by fortune organization. There are upcoming libraries in Python3 that support machine learning, data science, database manipulation, and Artificial Intelligence. Python is also one of the hottest skills to have and one of the most popular programming language in the world. In the last few years, it has been ranked as the number one most wanted technology of the year.
- Free : Python is free to install, use, and distribute. There are different versions available for different Platforms. All Python releases are Open Source.
- Portable language (cross-platform) Python language is also a portable language . Say, if we have python code for a platform like Windows, Linux or Mac, we can run this code on any other platform (which has Python interpreter installed) without changing it.
- Object oriented : Python supports object-oriented language and concepts of classes and objects come into existence.
Difference Between Python2 and Python3
Python 3.0/Python 3000/Py3k is a new version of Python which is incompatible with the Python 2.x.(Python 2.0 was released in 2000).
Some of the major features that differ among the two are listed below !!
- Print in Python: In Python2 , print is a statement while in Python3 print is a function that is conversion from no brackets to brackets !
# syntax in Python2,
# invalid for Python3
"Hello GfG !!"chevron_right
# syntax for Python3
"Hello GfG !!"
- Integer Division: Integer division in Python2 yields integer.
Example: 3/2 will give 1 as an output!! (However, 3.0/2 or 3/2.0 will give 1.5 as the output).
Integer division in Python3 can give a float value if required as per the answer.
Example: 3/2 will give 1.5 as an output.
- Compatibility: Python2 is easy to port to Python3. Backward compatibility is not possible in Python3 .
- Performance: Python3 helps while typing whereas Python2 is not traditionally a typed language. Also, Python3 is faster in runtime execution than Python2.
- Not equal to operator:
(a <> b)chevron_right
In python3, “as” keyword was introduced.
except valueError :
except valueError as err:
- Python3 for GUI application | An Overview
- New '=' Operator in Python3.8 f-string
- How to implement Dictionary with Python3?
- Why PyPy3 is preffered over Python3?
- Positional-only Parameter in Python3.8
- Different Input and Output Techniques in Python3
- Python3 Intermediate Level Topics
- Automate the Conversion from Python2 to Python3
- Python3 - if , if..else, Nested if, if-elif statements
- Python2 vs Python3 | Syntax and performance Comparison
- Introduction to OpenCV
- Introduction to pygame
- Introduction to CherryPy
- Introduction to Tkinter
- Introduction to PySimpleGUI
- Introduction to TensorFlow
- Introduction to Bokeh in Python
- Introduction to Seaborn - Python
- Python Mahotas - Introduction
- Introduction to SQLite in Python
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.