Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

Python study material

Student copy

Downloading, Installing and Set up in local environment

Packages can be download location:-

https://www.python.org/downloads/

Environment variables on Windows OS

My Computer >> (RC) Properties >>Advanced system settings>> (Tab)Advance >> Environment variables

Edit path:-

C:\Python27;C:\Python27\Lib\site-packages;C:\Python27\Scripts;

IDLE

Executing from a file, command line and from interactive mode

Following run time examples

Python Identifiers and reserved key words

Akhil
Python study material
Student copy

Statement, Line indentation, comments, single double and triple quotes

# this is the first comment spam = 1

# and this is the second comment

# ... and now a third! text = "# This is not a comment because it's inside quotes.”

Statements in Python typically end with a new line. Python does, however, allow the use of the line
continuation character (\) to denote that the line should continue. For example:

if True:
print "True"
else:
print "False"
Python accepts single ('), double (") and triple (''' or """) quotes to denote string literals, as long as the
same type of quote starts and ends the string.
The triple quotes can be used to span the string across multiple lines. For example, all the following are
legal:
word = 'word'
sentence = "This is a sentence."
paragraph = """This is a paragraph. It is

Akhil
Python study material
Student copy

made up of multiple lines and sentences."""


# This is a comment.

Akhil

You might also like