This document provides an overview of key Python concepts, including its history and features. It discusses that Python is an interpreted, interactive, object-oriented language suitable for beginners. The document outlines Python's syntax, data types, operators, multithreaded programming capabilities, tuples, and concludes that Python has emerged as one of the most popular languages due to its focus on code quality and readability.
2. TABLE OF CONTENT:
History
Overview
Language features
Why Python?
Basic Syntax
Data Types
Types of Operator
Multithreaded Programming
Tuples
Conculsion
3. OVERVIEW:
Python is Interpreted
Python is Interactive
Python is Object-Oriented
Python is a Beginner's Language
4. LANGUAGE FEATURES:
Indentation instead of braces
Several sequence types
(i) Strings ’…’: made of characters, immutable
(ii) Lists […]: made of anything, mutable
(iii) Tuples (…) : made of anything, immutable
Powerful subscripting (slicing)
Functions are independent entities (not all functions are
methods)
Exceptions as in Java
Simple object system Iterators (like Java) and generators
5. WHY PYTHON?
Good example of scripting language
“Pythonic” style is very concise
Powerful but unobtrusive object system
Every value is an object
Powerful collection and iteration abstractions
Dynamic typing makes generics easy
6. WHICH PYTHON?
Python 2.7
Current version on Eniac, so we’ll use it
Last stable release before version 3
Implements some of the new features in version 3, but fully
backwards compatible
Python 3
Released a few years ago
Many changes (including incompatible changes)
Much cleaner language in many ways
Strings use Unicode, not ASCII
7. BASIC SYNTAX:
The Python language has many similarities to Perl, C, and
Java. However, there are some definite differences between
the languages.
Syntax:
$ python
Python 2.4.3 (#1, Nov 11 2010, 13:34:43)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-48)] on linux2
Type "help", "copyright", "credits" or "license" for
more information.
>>>
8. DATA TYPES:
Python has various standard data types that are used to define
the operations possible on them and the storage method for
each of them.
Python has five standard data types −
Numbers
String
List
Tuple
Dictionary
9. TYPES OF OPERATOR:
Python language supports the following types of operators.
Arithmetic Operators
Comparison (Relational) Operators
Assignment Operators
Logical Operators
Bitwise Operators
Membership Operators
Identity Operators
10. MULTITHREADED PROGRAMMING:
Running several threads is similar to running several different
programs concurrently, but with the following benefits −
Multiple threads within a process share the same data
space with the main thread and can therefore share information
or communicate with each other more easily than if they were
separate processes.
Threads sometimes called light-weight processes and
they do not require much memory overhead; they are cheaper
than processes.
11. TUPLES:
A tuple is a sequence of immutable Python objects. Tuples are
sequences, just like lists.
The differences between tuples and lists are, the tuples cannot
be changed unlike lists and tuples use parentheses, whereas
lists use square brackets.
Creating a tuple is as simple as putting different comma-
separated values.
Optionally you can put these comma-separated values
between parentheses also.
12. CONCULSION:
Since then, Python has emerged as one of the top four or five
most widely used programming languages in the world.
As it has grown in popularity, its focus on code quality and
readability, and their related impact on developer productivity,
seems to have become the more dominant factor behind
Python's success.
Python training in Chennai