- Simple
- If we compare with other language Python is a simple and minimalistic language. Reading a good Python program feels almost like reading English (but very strict English!). This pseudo-code nature of Python is one of its greatest strengths. It allows you to concentrate on the solution to the problem rather than the syntax i.e. the language itself.
- Easy to Learn
- As you will see, Python is extremely easy to get started with. Python has an extraordinarily simple syntax as already mentioned.For an armature it will be a very easy stuff to learn it quickly,because of its English like keywords.
- Free and Open Source
- Everyone needs an free solution for the organization.Pyhton is being a free and powerful solution which is an example of a FLOSS (Free/Libre and Open Source Software). In simple terms, you can freely distribute copies of this software, read the software’s source code, make changes to it, use pieces of it in new free programs, and that you know you can do these things. FLOSS is based on the concept of a community which shares knowledge. This is one of the reasons why Python is so good – it has been created and improved by a community who just want to see a better Python.
- High-level Language
- When you write programs in Python, you never need to bother about low-level details such as managing the memory used by your program.Unlike any other language python is not an complex stuff for managing the memory.Its inbuilt mechanism can able manage the memory by itself.
- Portable
- Due to its open-source nature, Python has been ported (i.e. changed to make it work on) to many many platforms. All your Python programs will work on any of these platforms without requiring any changes at all. However, you must be careful enough to avoid any system-dependent features.
You can use Python on Linux, Windows, Macintosh, Solaris, OS/2, Amiga, AROS, AS/400, BeOS, OS/390, z/OS, Palm OS, QNX, VMS, Psion, Acorn RISC OS, VxWorks, PlayStation, Sharp Zaurus, Windows CE and PocketPC !
- Interpreted
- This requires a little explanation.
A program written in a compiled language like C or C++ is translated from the source language i.e. C/C++ into a language spoken by your computer (binary code i.e. 0s and 1s) using a compiler with various flags and options. When you run the program, the linker/loader software just stores the binary code in the computer’s memory and starts executing from the first instruction in the program.
When you use an interpreted language like Python, there is no separate compilation and execution steps. You just run the program from the source code. Internally, Python converts the source code into an intermediate form called bytecodes and then translates this into the native language of your specific computer and then runs it. All this makes using Python so much easier. You just run your programs – you never have to worry about linking and loading with libraries, etc. They are also more portable this way because you can just copy your Python program into another system of any kind and it just works!
- Object Oriented
- Python supports procedure-oriented programming as well as object-oriented programming. In procedure-oriented languages, the program is built around procedures or functions which are nothing but reusable pieces of programs. In object-oriented languages, the program is built around objects which combine data and functionality. Python has a very powerful but simple way of doing object-oriented programming, especially, when compared to languages like C++ or Java.
- Extensible
- It will support the other language bindings.If you need a critical piece of code to run very fast, you can achieve this by writing that piece of code in C, and then combine that with your Python program.
- Embeddable
- Cross language support feature is providing more power to python.You can embed Python within your C/C++ program to give scripting capabilities for your program’s users.
- Extensive Libraries
- The Python Standard Library is huge indeed. It can help you do various things involving regular expressions, documentation generation, unit testing, threading, databases, web browsers, CGI, ftp, email, XML, XML-RPC, HTML, WAV files, cryptography, GUI(graphical user interfaces) using Tk, and also other system-dependent stuff. Remember, all this is always available wherever Python is installed. This is called the “batteries included” philosophy of Python.
Besides the standard library, there are various other high-quality libraries such as the Python Imaging Library which is an amazingly simple image manipulation library.
Python
How to Handle XML Files in Python
Introduction
- Xml (eXtensible Markup Language) is a markup language.
- XML is designed to store and transport data.
- Xml was released in late 90’s. it was created to provide an easy to use and store self-describing data.
- XML became a W3C Recommendation on February 10, 1998.
- XML is not a replacement for HTML.
- XML is designed to be self-descriptive.
- XML is designed to carry data, not to display data.
- XML tags are not predefined. You must define your own tags.
- XML is platform independent and language independent.
Sample XML File
<?xmlversion=“1.0”?>
<data>
<countryname=“Inida”>
<rankgrade=“22”>1</rank>
<yeargrade=“33”>2008</year>
<gdpgrade=“33”>141100</gdp>
<neighborname=“Austria”direction=“E”/>
<neighborname=“Switzerland”direction=“W”/>
</country>
<countryname=“Singapore”>
<rankgrade=“225”>1</rank>
<yeargrade=“335”>208</year>
<gdpgrade=“335”>11100</gdp>
<neighborname=“Malaysia”direction=“N”/>
</country>
<countryname=“US”>
<rank>68</rank>
<year>2011</year>
<gdppc>13600</gdppc>
<neighborname=“Canada”direction=“W”/>
<neighborname=“Colombia”direction=“E”/>
</country>
</data>
Python Module (xml.etree.ElementTree)
Parse()
This method will take the xml file as input will parse to the python friendly tree.
getroot()
This will return us the roots of the tree element.
Get()
This method will return us the attribute of an particular root element.

import xml.etree.ElementTree as ETT
tree = ETT.parse('ConData.xml')
root = tree.getroot()
for i in root:
print(i.get('name'))
#print(i)
for j in i:
#print(j.get('grade'))
print(j.text)
# for country in root.findall('country'):
# rank = country.find('rank').text
# rank = country.find('rank')
# name = country.get('name')
# print (name, rank)

Pyhton Code to Get Text Data From Pdf File by fetching form URL or Form Local Drive
In this post we will explain how to fetch the text data from the pdf file using Pyhton Code. To Get Text Data From Pdf You need to in install the flowing python library for data read form the pdf document.
1.urllib
This library will help you to download data file or pdf from the internet.By using this library we can download file from the http sites .
To install url library use this below command to get the data form the web.
pip install urllib
pip install urllib2
pip install urllib3
import urllib
urllib.urlretrieve(‘http://ird.iitd.ac.in/sites/default/files/jobs/project/advtprofaksrivastava2.pdf’, ‘data.pdf’)
2.PyPDF2
This library will help you to read the pdf and extract data
import PyPDF2
pdfFileObj = open('data.pdf', 'rb')
pdfReader = PyPDF2.PdfFileReader(pdfFileObj)
print pdfReader.numPages
pageObj = pdfReader.getPage(0)
print pageObj.extractText()
Looping in Python
Single Statement Suites
If the suite of an if clause consists only of a single line, it may go on the same line as the header statement.
Here is an example of a one-line if clause −
Live Demo
#!/usr/bin/python var = 100 if ( var == 100 ) : print "Value of expression is 100" print "Good bye!"
When the above code is executed, it produces the following result −
Value of expression is 100 Good bye!
In general, statements are executed sequentially − The first statement in a function is executed first, followed by the second, and so on. There may be a situation when you need to execute a block of code several number of times.
Programming languages provide various control structures that allow more complicated execution paths.
A loop statement allows us to execute a statement or group of statements multiple times. The following diagram illustrates a loop statement −

Python programming language provides the following types of loops to handle looping requirements.
| S.No. | Loop Type & Description |
|---|---|
| 1 | while loopRepeats a statement or group of statements while a given condition is TRUE. It tests the condition before executing the loop body. |
| 2 | for loopExecutes a sequence of statements multiple times and abbreviates the code that manages the loop variable. |
| 3 | nested loopsYou can use one or more loop inside any another while, or for loop. |
Loop Control Statements
The Loop control statements change the execution from its normal sequence. When the execution leaves a scope, all automatic objects that were created in that scope are destroyed.
Python supports the following control statements.
| S.No. | Control Statement & Description |
|---|---|
| 1 | break statementTerminates the loop statement and transfers execution to the statement immediately following the loop. |
| 2 | continue statementCauses the loop to skip the remainder of its body and immediately retest its condition prior to reiterating. |
| 3 | pass statementThe pass statement in Python is used when a statement is required syntactically but you do not want any command or code to execute. |
Let us go through the loop control statements briefly.
Iterator and Generator
Iterator is an object which allows a programmer to traverse through all the elements of a collection, regardless of its specific implementation. In Python, an iterator object implements two methods, iter() and next().
String, List or Tuple objects can be used to create an Iterator.
list = [1,2,3,4] it = iter(list) # this builds an iterator object print (next(it)) #prints next available element in iterator Iterator object can be traversed using regular for statement !usr/bin/python3 for x in it: print (x, end=" ") or using next() function while True: try: print (next(it)) except StopIteration: sys.exit() #you have to import sys module for this
A generator is a function that produces or yields a sequence of values using yield method.
When a generator function is called, it returns a generator object without even beginning execution of the function. When the next() method is called for the first time, the function starts executing until it reaches the yield statement, which returns the yielded value. The yield keeps track i.e. remembers the last execution and the second next() call continues from previous value.
Example
The following example defines a generator, which generates an iterator for all the Fibonacci numbers.
!usr/bin/python3 import sys def fibonacci(n): #generator function a, b, counter = 0, 1, 0 while True: if (counter > n): return yield a a, b = b, a + b counter += 1 f = fibonacci(5) #f is iterator object while True: try: print (next(f), end=" ") except StopIteration: sys.exit()
Python Variable Declaration Rules and Syntax
Variable and Value
- A variable is a memory location where a programmer can store a value. Example : roll_no, amount, name etc.
- Value is either string, numeric etc. Example : “Sara”, 120, 25.36
- Variables are created when first assigned.
- Variables must be assigned before being referenced.
- The value stored in a variable can be accessed or updated later.
- No declaration required
- The type (string, int, float etc.) of the variable is determined by Python
- The interpreter allocates memory on the basis of the data type of a variable.
Python Variable Name Rules
- Must begin with a letter (a – z, A – B) or underscore (_)
- Other characters can be letters, numbers or _
- Case Sensitive
- Can be any (reasonable) length
- There are some reserved words which you cannot use as a variable name because Python uses them for other things.
Good Variable Name
- Choose meaningful name instead of short name. roll_no is better than rn.
- Maintain the length of a variable name. Roll_no_of_a-student is too long?
- Be consistent; roll_no or or RollNo
- Begin a variable name with an underscore(_) character for a special case.
Variable assignment
We use the assignment operator (=) to assign values to a variable. Any type of value can be assigned to any valid variable.
a = 5
b = 3.2
c = "Hello"
Here, we have three assignment statements. 5 is an integer assigned to the variable a.
Similarly, 3.2 is a floating point number and "Hello" is a string (sequence of characters) assigned to the variables b and c respectively.
Multiple assignments
In Python, multiple assignments can be made in a single statement as follows:
a, b, c = 5, 3.2, "Hello"
If we want to assign the same value to multiple variables at once, we can do this as
x = y = z = "same"
This assigns the “same” string to all the three variables.
If you have any further clarification on this topic please give comment bellow Python Variable Declaration Rules and Syntax
Python String Functions
In this below post we will go through the Python String Functions and their their uses. Strings operation and manipulation is very easy in the python . We can create them simply by enclosing characters in quotes. Python treats single quotes the same as double quotes. Creating strings is as simple as assigning a value to a variable. For example −
var1 = 'Hello World!' var2 = "Python Programming"
Accessing Values in Strings
Python does not support a character type; these are treated as strings of length one, thus also considered a Substring.
To access substrings, use the square brackets for slicing along with the index or indices to obtain your substring. For example −
#!/usr/bin/python var1 = 'Hello World!' var2 = "Python Programming" print "var1[0]: ", var1[0] print "var2[1:5]: ", var2[1:5]
When the above code is executed, it produces the following result −
var1[0]: H var2[1:5]: ytho
Updating Strings
You can “update” an existing string by (re)assigning a variable to another string. The new value can be related to its previous value or to a completely different string altogether. For example −
#!/usr/bin/python var1 = 'Hello World!' print "Updated String :- ", var1[:6] + 'Python'
When the above code is executed, it produces the following result −
Updated String :- Hello Python
Escape Characters
Following table is a list of escape or non-printable characters that can be represented with backslash notation.
An escape character gets interpreted; in a single quoted as well as double quoted strings.
| Backslash notation |
Hexadecimal character |
Description |
|---|---|---|
| \a | 0x07 | Bell or alert |
| \b | 0x08 | Backspace |
| \cx | Control-x | |
| \C-x | Control-x | |
| \e | 0x1b | Escape |
| \f | 0x0c | Formfeed |
| \M-\C-x | Meta-Control-x | |
| \n | 0x0a | Newline |
| \nnn | Octal notation, where n is in the range 0.7 | |
| \r | 0x0d | Carriage return |
| \s | 0x20 | Space |
| \t | 0x09 | Tab |
| \v | 0x0b | Vertical tab |
| \x | Character x | |
| \xnn | Hexadecimal notation, where n is in the range 0.9, a.f, or A.F |
String Special Operators
Assume string variable a holds ‘Hello’ and variable b holds ‘Python’, then −
| Operator | Description | Example |
|---|---|---|
| + | Concatenation – Adds values on either side of the operator | a + b will give HelloPython |
| * | Repetition – Creates new strings, concatenating multiple copies of the same string | a*2 will give -HelloHello |
| [] | Slice – Gives the character from the given index | a[1] will give e |
| [ : ] | Range Slice – Gives the characters from the given range | a[1:4] will give ell |
| in | Membership – Returns true if a character exists in the given string | H in a will give 1 |
| not in | Membership – Returns true if a character does not exist in the given string | M not in a will give 1 |
| r/R | Raw String – Suppresses actual meaning of Escape characters. The syntax for raw strings is exactly the same as for normal strings with the exception of the raw string operator, the letter “r,” which precedes the quotation marks. The “r” can be lowercase (r) or uppercase (R) and must be placed immediately preceding the first quote mark. | print r’\n’ prints \n and print R’\n’prints \n |
| % | Format – Performs String formatting | See at next section |
String Formatting Operator
One of Python’s coolest features is the string format operator %. This operator is unique to strings and makes up for the pack of having functions from C’s printf() family. Following is a simple example −
#!/usr/bin/python print "My name is %s and weight is %d kg!" % ('Zara', 21)
When the above code is executed, it produces the following result −
My name is Zara and weight is 21 kg!
Here is the list of complete set of symbols which can be used along with % −
| Format Symbol | Conversion |
|---|---|
| %c | character |
| %s | string conversion via str() prior to formatting |
| %i | signed decimal integer |
| %d | signed decimal integer |
| %u | unsigned decimal integer |
| %o | octal integer |
| %x | hexadecimal integer (lowercase letters) |
| %X | hexadecimal integer (UPPERcase letters) |
| %e | exponential notation (with lowercase ‘e’) |
| %E | exponential notation (with UPPERcase ‘E’) |
| %f | floating point real number |
| %g | the shorter of %f and %e |
| %G | the shorter of %f and %E |
Other supported symbols and functionality are listed in the following table −
| Symbol | Functionality |
|---|---|
| * | argument specifies width or precision |
| – | left justification |
| + | display the sign |
| <sp> | leave a blank space before a positive number |
| # | add the octal leading zero ( ‘0’ ) or hexadecimal leading ‘0x’ or ‘0X’, depending on whether ‘x’ or ‘X’ were used. |
| 0 | pad from left with zeros (instead of spaces) |
| % | ‘%%’ leaves you with a single literal ‘%’ |
| (var) | mapping variable (dictionary arguments) |
| m.n. | m is the minimum total width and n is the number of digits to display after the decimal point (if appl.) |
Triple Quotes
Python’s triple quotes comes to the rescue by allowing strings to span multiple lines, including verbatim NEWLINEs, TABs, and any other special characters.
The syntax for triple quotes consists of three consecutive single or doublequotes.
#!/usr/bin/python para_str = """this is a long string that is made up of several lines and non-printable characters such as TAB ( \t ) and they will show up that way when displayed. NEWLINEs within the string, whether explicitly given like this within the brackets [ \n ], or just a NEWLINE within the variable assignment will also show up. """ print para_str
When the above code is executed, it produces the following result. Note how every single special character has been converted to its printed form, right down to the last NEWLINE at the end of the string between the “up.” and closing triple quotes. Also note that NEWLINEs occur either with an explicit carriage return at the end of a line or its escape code (\n) −
this is a long string that is made up of several lines and non-printable characters such as TAB ( ) and they will show up that way when displayed. NEWLINEs within the string, whether explicitly given like this within the brackets [ ], or just a NEWLINE within the variable assignment will also show up.
Raw strings do not treat the backslash as a special character at all. Every character you put into a raw string stays the way you wrote it −
#!/usr/bin/python print 'C:\\nowhere'
When the above code is executed, it produces the following result −
C:\nowhere
Now let’s make use of raw string. We would put expression in r’expression’ as follows −
#!/usr/bin/python print r'C:\\nowhere'
When the above code is executed, it produces the following result −
C:\\nowhere
Unicode String
Normal strings in Python are stored internally as 8-bit ASCII, while Unicode strings are stored as 16-bit Unicode. This allows for a more varied set of characters, including special characters from most languages in the world. I’ll restrict my treatment of Unicode strings to the following −
#!/usr/bin/python print u'Hello, world!'
When the above code is executed, it produces the following result −
Hello, world!
As you can see, Unicode strings use the prefix u, just as raw strings use the prefix r.
Built-in String Methods
Python includes the following built-in methods to manipulate strings −
| SN | Methods with Description |
|---|---|
| 1 | capitalize() Capitalizes first letter of string |
| 2 | center(width, fillchar)
Returns a space-padded string with the original string centered to a total of width columns. |
| 3 | count(str, beg= 0,end=len(string))
Counts how many times str occurs in string or in a substring of string if starting index beg and ending index end are given. |
| 4 | decode(encoding=’UTF-8′,errors=’strict’)
Decodes the string using the codec registered for encoding. encoding defaults to the default string encoding. |
| 5 | encode(encoding=’UTF-8′,errors=’strict’)
Returns encoded string version of string; on error, default is to raise a ValueError unless errors is given with ‘ignore’ or ‘replace’. |
| 6 | endswith(suffix, beg=0, end=len(string)) Determines if string or a substring of string (if starting index beg and ending index end are given) ends with suffix; returns true if so and false otherwise. |
| 7 | expandtabs(tabsize=8)
Expands tabs in string to multiple spaces; defaults to 8 spaces per tab if tabsize not provided. |
| 8 | find(str, beg=0 end=len(string))
Determine if str occurs in string or in a substring of string if starting index beg and ending index end are given returns index if found and -1 otherwise. |
| 9 | index(str, beg=0, end=len(string))
Same as find(), but raises an exception if str not found. |
| 10 | isalnum()
Returns true if string has at least 1 character and all characters are alphanumeric and false otherwise. |
| 11 | isalpha()
Returns true if string has at least 1 character and all characters are alphabetic and false otherwise. |
| 12 | isdigit()
Returns true if string contains only digits and false otherwise. |
| 13 | islower()
Returns true if string has at least 1 cased character and all cased characters are in lowercase and false otherwise. |
| 14 | isnumeric()
Returns true if a unicode string contains only numeric characters and false otherwise. |
| 15 | isspace()
Returns true if string contains only whitespace characters and false otherwise. |
| 16 | istitle()
Returns true if string is properly “titlecased” and false otherwise. |
| 17 | isupper()
Returns true if string has at least one cased character and all cased characters are in uppercase and false otherwise. |
| 18 | join(seq)
Merges (concatenates) the string representations of elements in sequence seq into a string, with separator string. |
| 19 | len(string)
Returns the length of the string |
| 20 | ljust(width[, fillchar])
Returns a space-padded string with the original string left-justified to a total of width columns. |
| 21 | lower()
Converts all uppercase letters in string to lowercase. |
| 22 | lstrip()
Removes all leading whitespace in string. |
| 23 | maketrans()
Returns a translation table to be used in translate function. |
| 24 | max(str)
Returns the max alphabetical character from the string str. |
| 25 | min(str)
Returns the min alphabetical character from the string str. |
| 26 | replace(old, new [, max])
Replaces all occurrences of old in string with new or at most max occurrences if max given. |
| 27 | rfind(str, beg=0,end=len(string))
Same as find(), but search backwards in string. |
| 28 | rindex( str, beg=0, end=len(string))
Same as index(), but search backwards in string. |
| 29 | rjust(width,[, fillchar])
Returns a space-padded string with the original string right-justified to a total of width columns. |
| 30 | rstrip()
Removes all trailing whitespace of string. |
| 31 | split(str=””, num=string.count(str))
Splits string according to delimiter str (space if not provided) and returns list of substrings; split into at most num substrings if given. |
| 32 | splitlines( num=string.count(‘\n’))
Splits string at all (or num) NEWLINEs and returns a list of each line with NEWLINEs removed. |
| 33 | startswith(str, beg=0,end=len(string))
Determines if string or a substring of string (if starting index beg and ending index end are given) starts with substring str; returns true if so and false otherwise. |
| 34 | strip([chars])
Performs both lstrip() and rstrip() on string |
| 35 | swapcase()
Inverts case for all letters in string. |
| 36 | title()
Returns “titlecased” version of string, that is, all words begin with uppercase and the rest are lowercase. |
| 37 | translate(table, deletechars=””)
Translates string according to translation table str(256 chars), removing those in the del string. |
| 38 | upper()
Converts lowercase letters in string to uppercase. |
| 39 | zfill (width)
Returns original string leftpadded with zeros to a total of width characters; intended for numbers, zfill() retains any sign given (less one zero). |
| 40 | isdecimal()
Returns true if a unicode string contains only decimal characters and false otherwise. |
History of Python Comedy, Snake or Programming Language
History of Python
Easy as ABC
What do the alphabet and the programming language Python have in common? Right, both start with ABC. If we are talking about ABC in the Python context, it’s clear that the programming language ABC is meant. ABC is a general-purpose programming language and programming environment, which had been developed in the Netherlands, Amsterdam, at the CWI (Centrum Wiskunde & Informatica). The greatest achievement of ABC was to influence the design of Python.
Python was conceptualized in the late 1980s. Guido van Rossum worked that time in a project at the CWI, called Amoeba, a distributed operating system. In an interview with Bill Venners1, Guido van Rossum said: “In the early 1980s, I worked as an implementer on a team building a language called ABC at Centrum voor Wiskunde en Informatica (CWI). I don’t know how well people know ABC’s influence on Python. I try to mention ABC’s influence because I’m indebted to everything I learned during that project and to the people who worked on it.”
Later on in the same Interview, Guido van Rossum continued: “I remembered all my experience and some of my frustration with ABC. I decided to try to design a simple scripting language that possessed some of ABC’s better properties, but without its problems. So I started typing. I created a simple virtual machine, a simple parser, and a simple runtime. I made my own version of the various ABC parts that I liked. I created a basic syntax, used indentation for statement grouping instead of curly braces or begin-end blocks, and developed a small number of powerful data types: a hash table (or dictionary, as we call it), a list, strings, and numbers.”
Comedy, Snake or Programming Language
So, what about the name “Python”: Most people think about snakes, and even the logo depicts two snakes, but the origin of the name has its root in British humour. Guido van Rossum, the creator of Python, wrote in 1996 about the origin of the name of his programming language1: “Over six years ago, in December 1989, I was looking for a ‘hobby’ programming project that would keep me occupied during the week around Christmas. My office … would be closed, but I had a home computer, and not much else on my hands. I decided to write an interpreter for the new scripting language I had been thinking about lately: a descendant of ABC that would appeal to Unix/C hackers. I chose Python as a working title for the project, being in a slightly irreverent mood (and a big fan of Monty Python’s Flying Circus).”
The Zen of Python
- Beautiful is better than ugly.
- Explicit is better than implicit.
- Simple is better than complex.
- Complex is better than complicated.
- Flat is better than nested.
- Sparse is better than dense.
- Readability counts.
- Special cases aren’t special enough to break the rules.
- Although practicality beats purity.
- Errors should never pass silently.
- Unless explicitly silenced.
- In the face of ambiguity, refuse the temptation to guess.
- There should be one — and preferably only one — obvious way to do it.
- Although that way may not be obvious at first unless you’re Dutch.
- Now is better than never.
- Although never is often better than *right* now.
- If the implementation is hard to explain, it’s a bad idea.
- If the implementation is easy to explain, it may be a good idea.
- Namespaces are one honking great idea — let’s do more of those!
Development Steps of Python
Guido Van Rossum published the first version of Python code (version 0.9.0) at alt.sources in February 1991. This release included already exception handling, functions, and the core data types of list, dict, str and others. It was also object oriented and had a module system.
Python version 1.0 was released in January 1994. The major new features included in this release were the functional programming tools lambda, map, filter and reduce, which Guido Van Rossum never liked.
Six and a half years later in October 2000, Python 2.0 was introduced. This release included list comprehensions, a full garbage collector and it was supporting unicode.
Python flourished for another 8 years in the versions 2.x before the next major release as Python 3.0 (also known as “Python 3000” and “Py3K”) was released. Python 3 is not backwards compatible with Python 2.x. The emphasis in Python 3 had been on the removal of duplicate programming constructs and modules, thus fulfilling or coming close to fulfilling the 13th law of the Zen of Python: “There should be one — and preferably only one — obvious way to do it.”
Some changes in Python 3.0:
- Print is now a function
- Views and iterators instead of lists
- The rules for ordering comparisons have been simplified. E.g. a heterogeneous list cannot be sorted, because all the elements of a list must be comparable to each other.
- There is only one integer type left, i.e. int. long is int as well.
- The division of two integers returns a float instead of an integer. “//” can be used to have the “old” behaviour.
- Text Vs. Data Instead Of Unicode Vs. 8-bit
For more on Python 2 & 3 please visit the post Difference between Python 2 and 3
Setup and Working with Python With PyCharm IDE
In this video tutorial you will find Setup and Working with Python With PyCharm IDE.
How To Install Python in Windows to Setup Environment Variable Step By Step Guide
In this tutorial we will explain How To Install Python in Windows to Setup Environment Variable.
Step 1-
Download the python installer.From the python.org Link
Step 2-
Install the installer by clicking Next.
After Installing your pyhton is ready.
Video Tutorial-
Features of Python Programming Language
Features of Python Programming Language that are listed below.
1) Easy to Learn and Use
Python is easy to learn and use. It is developer-friend
ly and high level programming language.With minimal syntax and easy to remember keyword makes its special from any other language.
2) Expressive Language
Python language is more expressive means that it is more understandable and readable.English like keyword is very easy to understand the context of the subject.
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.It will eliminate the compilation by making machine level language at the time of saving the python files.
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.
5) Free and Open Source
Python language is freely available at offical web address.The source-code is also available. Therefore it is open source.It supports most of the platform available in the market.
6) Object-Oriented Language
Python supports object oriented language and concepts of classes and objects come into existence.It is also an object oriented language like C++,Java etc..
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.
8) Large Standard Library
Python has a large and broad library and provides rich set of module and functions for rapid application development.The most usable feature of the python is that all the standard set of library are readily available.
9) GUI Programming Support
Graphical user interfaces can be developed using Python.It is supported the GUI programming this the interesting fact of Pyhton.
10) Integrated
It can be easily integrated with languages like C, C++, JAVA etc. With the help of the packages it can be readily integrated with above language.
If you have any further clarification on python please give comment bellow Features of Python Programming Language

