What is Python

What is Python




Python is an interpreted, object oriented and high level programming language which uses Dynamic Semantics that means its data type can be changed during the runtime. By design, Python is seen as a readable and user-friendly language. It is a complete object-oriented programming language and it is pretty easy to use. In the late 1980s Guido van Rossum started its development. When Mr. Guido was developing this language he was watching a show called "Monty Python Circus" and while watching this show he thought of the name Python and he named this language "Python". He did this because he wanted to choose a short and mysterious name for some reason. So he thought of naming it Python only. Till 12 July 2018, Mr. Guido took the responsibility of developing and maintaining Python alone. For a Lead developer this work is very appreciable and really hard. After 2018 Mr. Guido announced his permanent vacation from this role. After this Python's core developers elected a team of five persons that will lead python further Mr. Guido, himself told what started the development of python and he wrote this text which you guys can read on your own by pausing the video. After this long journey of Python development, today, Python is one of the most preferred language. Python's development was going on in the 1990's and in 2000 Python 2 was released. After that in 2008 Python 3 was launched. With Python 3, a utility named "2 to 3" was released which will help you convert your Python 2 code to Python 3. Because of Python's popularity, after 2008 many people were still using Python 2.7 because they were very comfortable with its syntax. and there were a lot of changes in Python 3 that were completely different from Python 2 and because of learning inertia developers were not switching to Python 3 . Python 2.7's end of life was announced in 2015 that means after this no update will be made for Python 2. And all code development will be of Python 3 only. Python 3.9.2 and 3.8.8 were two of the versions which were developed very quickly because there were some missing security updates in Python and some vulnerabilities like Remote Code Execution and Web Cash Poisoning were to be resolved in previous versions. So these were some amazing facts related to Python and now let's come to the language. and let's quickly see the syntax of python. To write comment in Python you just need to use # symbol and after that whatever you write in that single line is treated as comment and it won't be treated as a Python code. For multiline comments you can use triple quotes like this and whatever you write inside it will be comment out. That means it won't be parsed and executed. There is a function called print in Python which is used to print a string/ number/ variable A print syntax is written like this in Python 3 and you can print anything your name, a float or an object. In Python you can use arithmetic operators like this that will help you add,subtract,multiply or divide. To declare a variable, you can simply use variable = value. If the value is a string use single or double quotes and triple quotes can be used for multiline strings. You can store a number like this. and a float like this. You can also change the datatype of a variable after declaring it. To store values more than one you can use lists. Lists syntax is written within square brackets like this. Lists can be changed anytime. In it you can append values. There is one more datatype like list in python but you can't change it This datatype is known as tuple.You can write a tuple like this. It's values are separated by comma inside two parentheses. To write a tuple with one value you need to put an extra comma . If I write a = ("1" ,) then it will make a tuple of one value. We can use a dictionary to store a Key Value Pair. Python is seen as a readable language and a friendly language for developers and beginners. And the dictionary in Python is like a real Oxford Dictionary where you look for Key Value pairs. Keys are the words and the meaning is the value. In Python also you can create a dictionary like this. Its syntax could be written like this with the help of curly braces and you can write the Key Value pairs like this. Then to access the Key Value pair you can use this syntax. Python has one more collection called set. The main feature of set is that you can't have duplicate values in it You can initialize a set like this and if you type 1 then 2 and then 3 and 9. Then your set would look like this but if I insert 1 again then your set value won't change because this set already has 1. If I used list I would have gotten repeated values but set help us when we want to restrict repeated values Like that you can use none value to represent nothing. You can write none like this. Boolean values can be used to store True and False. If your variable has true or false value you can write like this. In python we have an if else syntax like this. You can write if/ else like this and you can use if,elif,elif,else like this to make if else ladder. Inside if you need to write a condition which will be evaluated to True or False, if it's true it will go in If and if it's false it will go to else or it will check the condition of elif. If you want to make a function in Python you use def keyword like this. Inside a function you may return a value. If nothing is returned then none is returned. This is the same none which we learned about earlier in the video. The most beautiful thing about Python is modules. Many people have written alot of code in Python which you can use by importing it. And you will import this code in form of a module. We have this syntax for importing in Python. These modules are of two types Built In and External modules. Built In modules are already there in Python. You don't need to download it. But the external modules needs to be installed from pip or any other tool. So that you can use the code from someone else in your computer and python script This code is formatted as classes and functions. When you will be advanced in Python. You may make your own module and publish it also so that others can use it. Python is an Object Oriented Programming language. That means you can use classes and object and also use objects oriented paradigm. Object oriented programming means that you can make objects from a class which is a blueprint. If I take an empty form as a class,then I will take individually filled forms as an object. Objects formed from this class. You can make your own custom classes and inherit already defined classes to change our class and you can do all this work in Python's awesome and easy to use syntax. So this was a brief on Python. So that's it for today.


In this video, I'm going to answer the top questions about Python: - What is Python? - What can you do with Python? - What kind of applications can you build with Python? - How to learn Python? Python is one of the top three most popular programming languages in 2019 and everybody is learning Python either to make their life easier or to expand their job opportunities. Python is often used in: - Data science and machine learning - Web development - Automation In fact, if you want to get into data science and machine learning, Python is THE language that you must learn.

Post a Comment

If all of you have any problem, then you can fill the contact form given below and send it to us. Apart from this, you can also mail us now.

Previous Post Next Post

POST ADS1

POST ADS 2