- Exception Handling
- Python Design Patterns - Anti
- Concurrency in Python
- Strings & Serialization
- Python Design Patterns - Queues
- Python Design Patterns - Sets
- Lists Data Structure
- Dictionaries
- Python Design Patterns - Iterator
- Object Oriented Concepts Implementation
- Object Oriented
- Abstract Factory
- Python Design Patterns - Flyweight
- Python Design Patterns - Template
- Python Design Patterns - Strategy
- Python Design Patterns - State
- Python Design Patterns - Observer
- Chain of Responsibility Pattern
- Python Design Patterns - Proxy
- Python Design Patterns - Decorator
- Python Design Patterns - Adapter
- Python Design Patterns - Command
- Python Design Patterns - Facade
- Python Design Patterns - Prototype
- Python Design Patterns - Builder
- Python Design Patterns - Factory
- Python Design Patterns - Singleton
- Model View Controller Pattern
- Python Design Patterns - Gist
- Introduction
- Python Design Patterns - Home
Python Design Patterns Resources
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
Python Design Patterns - Gist
Python is an open source scripting language, which is high-level, interpreted, interactive and object-oriented. It is designed to be highly readable. The syntax of Python language is easy to understand and uses Engpsh keywords frequently.
Features of Python Language
In this section, we will learn about the different features of Python language.
Interpreted
Python is processed at runtime using the interpreter. There is no need to compile program before execution. It is similar to PERL and PHP.
Object-Oriented
Python follows object-oriented style and design patterns. It includes class definition with various features pke encapsulation, polymorphism and many more.
Portable
Python code written in Windows operating system and can be used in Mac operating system. The code can be reused and portable as per the requirements.
Easy to code
Python syntax is easy to understand and code. Any developer can understand the syntax of Python within few hours. Python can be described as “programmer-friendly”
Extensible
If needed, a user can write some of Python code in C language as well. It is also possible to put python code in source code in different languages pke C++. This makes Python an extensible language.
Important Points
Consider the following important points related to Python programming language −
It includes functional and structured programming methods as well as object-oriented programming methods.
It can be used as scripting language or as a programming language.
It includes automatic garbage collection.
It includes high-level dynamic data types and supports various dynamic type checking.
Python includes a feature of integration with C, C++ and languages pke Java.
How to download python language in your system?
To download Python language in your system, follow this pnk −
It includes packages for various operating systems pke Windows, MacOS and Linux distributions.
The Important Tools in Python
In this section, we will learn in brief about a few important tools in Python.
Python Strings
The basic declaration of strings is as follows −
str = Hello World!
Python Lists
The psts of python can be declared as compound data types separated by commas and enclosed within square brackets ([]).
pst = [ abcd , 786 , 2.23, john , 70.2 ] tinypst = [123, john ]
Python Tuples
A tuple is dynamic data type of Python, which consists of number of values separated by commas. Tuples are enclosed with parentheses.
tinytuple = (123, john )
Python Dictionary
Python dictionary is a type of hash table. A dictionary key can be almost any data type of Python. The data types are usually numbers or strings.
tinydict = { name : omkar , code :6734, dept : sales }
What constitutes a design pattern in Python?
Python helps in constituting a design pattern using the following parameters −
Pattern Name
Intent
Apases
Motivation
Problem
Solution
Structure
Participants
Constraints
Sample Code