Introduction
In the late 1980s guido van rossumstarted its development. When mr. Guido was developing this languagehe was watching a show called"monty python circus"and while watching this show he thoughtof the name pythonand he named this language "python". He did this because he wanted to choose ashort and mysterious name for some reason. So he thought of naming it python only.
Till 12 july 2018, mr. Guido took theresponsibilityof developing and maintaining python alone. For a lead developer this work isvery appreciable and really hard. After 2018 mr. Guido announced hispermanentvacation from this role. After this python's core developers elected ateamof five persons that will lead python furthermr.
After this long journey ofpython development, today, python is one of the mostpreferred language. Python's development was goingon in the 1990'sand 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 convertyour python 2 code to python 3. Because of python's popularity, after 2008many people were still using python 2.7because they were very comfortable with itssyntax. And there were a lot of changes in python 3that were completely different from python 2 andbecause of learning inertia developers werenotswitching to python 3 .
Python 2.7's end of life was announced in 2015 that meansafter 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 theversionswhich were developed very quicklybecause there were some missing securityupdates in pythonand some vulnerabilities like remote codeexecutionand web cash poisoning were to be resolvedin previous versions. So these were some amazing facts related topython andnow let's come to the language.
Comment in python
And let's quickly see the syntax of python. To write comment in python you just need to use # symbol andafter that whatever you write in that singlelineis treated as comment and it won't be treated as a python code. For multiline comments you can usetriple quotes like thisand whatever you write inside it will becomment out. That means it won't be parsed and executed.
Print function in Python
Arithmetic Operators
In python you can use arithmetic operators like this that will help you add, subtract, multiply ordivide.
Variable & Data type
To declare a variable, you can simply usevariable = value. If the value is a string usesingle or double quotesand triple quotes can be usedfor 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.
Lists in python
To store values more than oneyou can use lists. Lists syntax is written withinsquare brackets like this. Lists can be changed anytime. In it you canappend values.
Tuple
There is one more datatype like list in python but you can't change itthis datatype is known as tuple. You can write a tuple like this. It's values are separated by comma inside twoparentheses. To write a tuple with one value you need toput an extra comma . If i write a = ("1" , ) then it will make a tuple of one value.
Dictionary in python
Set in python
Python has one more collection called set. The main feature of set is that you can'thave duplicate values in ityou can initialize a set like this and if you type 1 then 2 andthen 3 and 9. Then your set wouldlook like this butif i insert 1 again then your set valuewon't change because this set already has 1.
Set vs list
If i used list i would have gottenrepeated values but set help us when wewant to restrict repeated values
None in python
Boolean
Conditional statement
Function in python
If you want to make a function in python you use def keyword like this. Inside a function you may return a value. Ifnothing is returned then none is returned. This is the same nonewhich we learnedabout earlier .
Modules in python
Oops in python
Conclusion
So that's it for today. Thank you so muchguys for reading this article . And i will see you next time.




.jpeg)


.jpeg)

.png)
.jpeg)

-1.jpg)
.jpeg)

.jpeg)
.png)
.png)
.jpeg)
Comments
Post a Comment