28.10.2021 Views

Python Tutorial ( PDFDrive )

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Table of Content

Python Tutorial .......................................................................... 2

Audience .................................................................................... 2

Prerequisites .............................................................................. 2

Copyright & Disclaimer Notice ................................................... 2

Python Overview ..................................................................... 40

History of Python: ..................................................................................... 40

Python Features: ...................................................................................... 40

Python Environment ................................................................ 42

Getting Python: ........................................................................................ 43

Install Python: ........................................................................................... 43

Unix & Linux Installation: .......................................................................... 43

Windows Installation: ............................................................................... 43

Macintosh Installation: .............................................................................. 44

Setting up PATH: ..................................................................................... 44

Setting path at Unix/Linux: ....................................................................... 44

Setting path at Windows: ......................................................................... 44

Python Environment Variables: ................................................................ 45

Running Python: ....................................................................................... 45

(1) Interactive Interpreter: ......................................................................... 45

(2) Script from the Command-line: ........................................................... 46

(3) Integrated Development Environment ................................................ 46

Python Basic Syntax ................................................................ 47

First Python Program: .............................................................................. 47

INTERACTIVE MODE PROGRAMMING: ................................................ 47

SCRIPT MODE PROGRAMMING: .......................................................... 47

Python Identifiers: .................................................................................... 48

Reserved Words: ..................................................................................... 48

Lines and Indentation: .............................................................................. 49

Multi-Line Statements: ............................................................................. 50

Quotation in Python: ................................................................................. 50

Comments in Python: ............................................................................... 50

Using Blank Lines: ................................................................................... 51

Waiting for the User: ................................................................................ 51

Multiple Statements on a Single Line: ...................................................... 51

Multiple Statement Groups as Suites: ...................................................... 51

Command-Line Arguments: ..................................................................... 51

Accessing Command-Line Arguments: .................................................... 52

TUTORIALS POINT

Simply Easy Learning

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!