Python Programming

מק"ט: #40832 | משך קורס: 32 שעות אק'
| מספר מפגשים: 4

Python started as an educational programming language, became popular as an intelligent scripting language and is now widely accepted and highly popular as a comprehensive multi-paradigm programming language, suitable for writing applications of any size and complexity. Its enthusiastic user-base and wide standard library, with the addition of numerous third-party libraries, frameworks and extensions, make it suitable for application in any area. Especially, Python’s layered multi-paradigm architecture makes it ideal as a first programming language and allows the novice to acquire it in convenient stages, where each stage attained may be sufficient to write serious applications.
Accordingly, this course starts by arming the student with all the tools necessary for developing conventional procedural application in Python. Then, it adds advanced procedural and functional tools. Then, data abstraction – classes with magic functions and iteration support. Finally – the object-oriented programming in Python is overviewed. This way, each student emerges from the course with a substantial and useful body of knowledge. Even students who come with a rudimentary programming background are capable to accomplish much with the procedural/functional level of Python and consider the object-oriented level as enhancement.
This course consists of an instructor led presentation and hands on exercises. MS Windows is used for convenience, but the learnt material is applicable to any other platform that supports Python, such as Linux.
The course addresses both Python versions 2 and 3, with no preference. 

הקורס פעיל לקבוצות מטעם ארגונים בלבד, ניתן לשלוח פנייה רק אם מדובר בקבוצה
*שדות חובה
PDF version


  • Use the default or some third-party IDE to write and run Python programs
  • Create well organized, efficient and robust Python applications using packages, modules, functions, classes and exception handling
  • Look up the rich Python standard and third-party libraries
  • Apply Python language constructs, operators and the essential built-in functions and modules
  • Understand and exploit Python’s dictionary-based access to variables and arguments
  • Program file input/output, manipulating files and directories.
  • Unleash the full power of procedural programming in Python
  • Apply functional programming in Python
  • Understand the Object Oriented paradigm as applied in Python
  • Exploit metadata exposed by the Python interpreter 

קהל יעד

This course is suitable for programmers maintaining existing projects or starting new projects in Python 2 or 3.

תנאי קדם

No previous knowledge of Python is assumed. However, students must be familiar with at least one structured conventional programming language. Experience writing procedural code, using iteration and selection control structures (while, for, if, else, else-if), and functions is mandatory. Prior knowledge or experience in object-oriented programming (classes, inheritance, polymorphism) is not required


Getting started:

  • Downloading and installing Python. 
  • The default IDE - IDLE. What to expect from third-party IDE’s
  • The import path
  • Simple expressions using built-in types. 
  • Immutable types, object references. 
  • The dictionary-based paradigm – traps, pitfalls and benefits
  • Console input and formatted output.

Procedural Python:

  • Python iterable types: list, string, file, tuple, dictionary, set
  • Free object structure, the JSON mapping.
  • Structured iteration: for, while, iterables. 
  • Selection and Booleans.
  • Runtime exceptions: handling and raising. 
  • List comprehension.

Functional Python:

  • Functions: defining and using. 
  • The two Python scopes, accessing global variables. 
  • Inner functions and closure. 
  • Functions as objects – passing function as argument – sort, XML.
  • Lambda functions: definition and typical uses.
  • Default argument values.
  • Implementing the program entry point, command line arguments. 

More functional Python.

  • Higher-order functions: decorator.
  • Variadic functions.
  • Programming without variables using recursion.
  • Functional support: filter, map, zip, reduce

String processing and file I/O:

  • Procedural string processing with the built-in string type.
  • Regular expressions in Python.
  • Text-file I/O. 
  • File and folder processing.
  • Object persistence - pickle


  • Packages: arranging modules hierarchically. 
  • Distributing packages.
  • Obtaining third-party Python packages.

Data abstraction in Python - classes.

  • Encapsulation of methods and state in Class. 
  • Guaranteed initialization - constructor. 
  • Information hiding – methods, private members, properties. 

More data abstraction in Python.

  • Magic methods: Indexed and keyed access. 
  • Magic methods: Sequential access – Iterator / generator protocol.
  • Bound and unbound methods.
  • Using metadata.

Introduction to object-oriented Python - polymorphism:

  • The requirement for substitutability - commonality and variance.
  • The Python approach: “Duck typing”.
  • Implementing commonality with inheritance.
  • Specifying interface: Abstract class and methods.
  • Constructor override and supercall, pitfalls.
  • Built-in examples: Exceptions.