Python Tutorial: 1) Easy To Learn and Use
Python Tutorial: 1) Easy To Learn and Use
Python Tutorial
Python is a simple, easy to learn, powerful, high level and object-oriented programming
language.
Python is an interpreted scripting language also. Guido Van Rossum is known as the
founder of python programming.
Python Features
Python provides lots of features that are listed below.
Python is easy to learn and use. It is developer-friendly and high level programming
language.
2) Expressive Language
Python language is more expressive means that it is more understandable and readable.
3) Interpreted Language
Python is an interpreted language i.e. interpreter executes the code line by line at a
time. This makes debugging easy and thus suitable for beginners.
4) Cross-platform Language
Python can run equally on different platforms such as Windows, Linux, Unix and
Macintosh etc. So, we can say that Python is a portable language.
Python supports object oriented language and concepts of classes and objects come into
existence.
7) Extensible
It implies that other languages such as C/C++ can be used to compile the code and thus
it can be used further in our python code.
Python has a large and broad library and prvides rich set of module and functions for
rapid application development.
10) Integrated
Python Applications
Python is known for its general purpose nature that makes it applicable in almost each
domain of software development. Python as a whole can be used in any sphere of
development.
1) Web Applications
We can use Python to develop web applications. It provides libraries to handle internet
protocols such as HTML and XML, JSON, Email processing, request, beautifulSoup,
Feedparser etc. It also provides Frameworks such as Django, Pyramid, Flask etc to
design and delelop web based applications. Some important developments are:
PythonWikiEngines, Pocoo, PythonBlogSoftware etc.
Python provides Tk GUI library to develop user interface in python based application.
Some other useful toolkits wxWidgets, Kivy, pyqt that are useable on several platforms.
The Kivy is popular for writing multitouch applications.
3) Software Development
Python is helpful for software development process. It works as a support language and
can be used for build control and management, testing etc.
Python is popular and widely used in scientific and numeric computing. Some useful
library and package are SciPy, Pandas, IPython etc. SciPy is group of packages of
engineering, science and mathematics.
5) Business Applications
Python is used to build Bussiness applications like ERP and e-commerce systems. Tryton
is a high level application platform.
Python is awesome to perform multiple tasks and can be used to develop multimedia
applications. Some of real applications are: TimPlayer, cplay etc.
8) 3D CAD Applications
To create CAD application Fandango is a real application which provides full features of
CAD.
9) Enterprise Applications
Python can be used to create applications which can be used within an Enterprise or an
Organization. Some real time applications are: OpenErp, Tryton, Picalo etc.
Using Python several application can be developed for image. Applications developed
are: VPython, Gogh, imgSeek etc.
There are several such applications which can be developed using Python
Python Variables
o Variable is a name which is used to refer memory location. Variable also known
as identifier and used to hold value.
o In Python, we don't need to specify the type of variable because Python is a type
infer language and smart enough to get variable type.
o Variable names can be a group of both letters and digits, but they have to begin
with a letter or an underscore.
Multiple Assignment
Python allows us to assign a value to multiple variables in a single statement which is
also known as multiple assignment.
We can apply multiple assignments in two ways either by assigning a single value to
multiple variables or assigning multiple values to multiple variables. Lets see given
examples.
1. Assigning single value to multiple variables
Eg:
x=y=z=50
print iple
print y
print z
a,b,c=5,10,15
print(a)
print (b)
print(c)
Output:
>>>
5
10
15
>>>
A=10
b="Hi Python"
c = 10.5
print(type(a));
print(type(b));
print(type(c))
str1 = 'hello javatpoint' #string str1
str2 = ' how are you' #string str2
print (str1[0:2]) #printing first two character using slice operator
print (str1[4]) #printing 4th character of the string
print (str1*2) #printing the string twice
print (str1 + str2) #printing the concatenation of str1 and str2
Python Keywords
Python Keywords are special reserved words which convey a special meaning to the
compiler/interpreter. Each keyword have a special meaning and a specific operation.
These keywords can't be used as variable. Following is the List of Python Keywords.