0% found this document useful (0 votes)
7 views

Python - Session - 1 CLASS

This document provides information about downloading, installing, and setting up the Python environment on a Windows OS. It discusses adding Python to the environment variables and PATH, as well as executing Python code from files, the command line, and interactive mode. The document also briefly covers Python identifiers, keywords, statements, indentation, comments, and different quote types used in strings.

Uploaded by

sdgdg
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views

Python - Session - 1 CLASS

This document provides information about downloading, installing, and setting up the Python environment on a Windows OS. It discusses adding Python to the environment variables and PATH, as well as executing Python code from files, the command line, and interactive mode. The document also briefly covers Python identifiers, keywords, statements, indentation, comments, and different quote types used in strings.

Uploaded by

sdgdg
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 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