Everything I learned from the following site.


It has a role similar to PATH. This variable tells the Python interpreter where to locate the module files imported into a program. It should include the Python source library directory and the directories containing Python source code. PYTHONPATH is sometimes preset by the Python installer.



Indentation are blocks. Not braces.

Multi-Line Statements

line continuation character (\)

But, within the [], {}, or () brackets do not need to use the line continuation character.

Quotation in Python

‘hello’/ “hello” both accepted.

Comments in Python


No multi line comment.

Waiting for the User

display the line and wait for user interaction.

input(“\n\nPress the enter key to exit.”)


Multiple Statements on a Single Line

‘;’ allows it. But makes it a single block.


blocks of individual statements are called suite. They follow a header line and ‘:’

if expression : 
elif expression : 
else : 


python -h


no declaration needed. Just assign.

Python has five standard data types −

  • Numbers
  • String
  • List
  • Tuple
  • Dictionary 



Python supports four different numerical types −

  • int (signed integers)
  • float (floating point real values)
  • complex (complex numbers)


Data hiding:


__ makes variable private and can be accessible only from the member functions.



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s