Udemy
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Basic Python with projects and examples
Rating: 3.7 out of 5(8 ratings)
630 students

Basic Python with projects and examples

Practical python with no nonsense.
Created byShakil khan
Last updated 7/2022
English
English [Auto],

What you'll learn

  • Fluency in Basic Python Programming

Course content

3 sections • 49 lectures • 6h 55m total length
  • Introduction9:29

    Explore Python as an easy, platform-independent interpreted language, its text processing and error handling, and practical basics like indentation, 2.7 vs 3.x, and using PyCharm for development.

  • Python Installation5:40

    Install python on Ubuntu by updating packages, then install python3 by default and optionally python2.7 for legacy work; install vim as editor, and use pip to install external packages.

  • Typical Python Program9:36

    Explore the structure of a typical Python program, from the shebang and interpreter to defining functions with def, indentation, and empty bodies with pass, cover strings, comments, and executing scripts.

  • String Part 112:58

    Learn how to work with strings in Python, including indexing, slicing, length, case conversion, docstrings, and common operations like split, find, count, replace, and concatenate.

  • String Part 27:43

    Learn Python 3 string formatting and placeholders, contrasting it with C/C++ style printf, and explore common string methods like split and how to access help and function details.

  • Slicing6:26

    Explore string slicing and list slicing by using start and end indices, end is not inclusive, optional steps, and negative indices to extract parts from strings, lists, and tuples.

  • List 19:47

    Explore list data structure by creating lists, accessing items by index (negative), and checking length. Learn to append, extend, and iterate lists; observe how plus operations affect elements and nesting.

  • List 28:33

    Explore Python lists by building a mixed-type list, using slicing for index ranges, and practicing insert, append, remove, and pop operations, plus index and count methods with basic error handling.

  • List 37:00

    Learn Python list operations: sorted returns a new sorted list. Min, max, and sum work on numbers; sorting strings; enumerate for indices; and joining list items into a string.

  • List 43:18

    Learn how the sort method modifies a list in place, contrasts with sorted which returns a new list, and how reverse=true yields descending order when printing from the back.

  • Tuple6:07

    Discover that tuples are immutable and cannot be modified in place. Learn to modify data by converting tuples to lists, adding elements, then converting back.

  • Set7:58

    Explore how sets use hash maps, differ from dictionaries by lacking values, remove duplicates, and support quick membership checks. Learn intersection, difference, and union on sets.

  • Dictionary 16:46

    Explore Python dictionaries and their hash-based structure, mapping keys to values, and learn to access keys, values, and items, iterate entries, ensure key uniqueness, and update dictionaries.

  • Dictionary 27:45

    Learn to work with Python dictionaries, including safe access with get and handling missing keys without errors. Update dictionaries to modify values and add new entries, and count word occurrences.

  • Dictionary 35:15

    Learn to work with Python dictionaries by iterating keys and values, using dict.items(), and deleting items with del or pop; order is not guaranteed.

  • *args and **kwargs and functions Part 17:52

    Explore how Python functions work, including defining with def, using global variables, and the rules for local scope; see how default arguments and lists enable flexible function calls.

  • *args, **kwargs and functions part 28:09

    Explore how to design functions with variable numbers of arguments in Python using *args and **kwargs, including summing inputs, iterating over arguments, and handling key-value pairs.

  • *args, **kwargs and functions part 36:11

    Explore how to use variable arguments in Python functions with normal args, *args, and **kwargs, including passing tuples and dictionaries, and iterating over items.

  • String Slicing Practice Question5:35

    Explore string slicing and immutable strings in Python by building a function that replaces a character at a given index, creating a new string rather than mutating the original.

  • Function Definition10:13

    Explore how to define and use Python functions, pass parameters and default arguments, return values, and even treat functions as data by storing and calling them from lists.

  • Exception and Error Handling14:51

    Master python exception handling with try-except blocks and finally, catching specific errors like zero division error and file not found, and raising custom exceptions for robust code.

  • Function performance using timeit part 16:29

    Learn multiple ways to measure function performance in Python, including the Linux time command, the timeit module, and the time module with time.time(), exploring real, user, and system timings.

  • Function performance using perf_counter, time.time and process_time part 213:28

    Compare three Python timing functions—perf_counter, process_time, and time.time—to measure code performance, noting that perf_counter includes sleep while process_time excludes it, and time.time reports epoch time.

  • swap variable with one line statement7:01

    Learn how Python uses tuple packing and unpacking to swap variables in a single line, like x, y = y, x, and compare it with C's temp-variable approach.

  • Classes and objects part 112:32

    Learn how Python classes group data and methods into objects, with self referencing each instance; see how a class acts as a blueprint and how class versus instance variables behave.

  • Classes and objects part 25:31

    Explore a continuing Python class example with an init constructor, a display method, and instance versus class method calls; examine class variables and dog attributes like color and texture.

  • Override class methods like str, len, repr13:12

    Override __len__ and __str__ in a simple class, implement __init__ and character counting, and choose between real length or a byte-aligned length for the object's string representation.

  • dir, type, id methods in python and their use case14:36

    Learn how Python’s dir, id, and type inspect objects, identity, and types with examples in strings and lists. Explore how magic methods like __eq__ shape behavior and equality.

  • Python Module Part 15:05

    Learn how to work with Python modules, import both standard and user-created modules without extensions, and call functions from modules like time and os across Python 2.7 and 3.x.

  • Python Module Part 25:17

    Learn to create a basic Python module, define a function, and reuse it across files by importing the module or specific functions, and access module variables like fruits.

  • Python Modules Part 39:13

    Learn to import specific items from a module vs importing everything, access fruits via module namespaces, and explore a Python class with __init__ and self that prints breed and colour.

  • Python Module Part 42:57

    Learn to import the dog module from another directory by appending the path before importing, and use environment or python path settings to resolve missing modules, while inspecting system paths.

  • List comprehensions part 18:25

    Learn how to create lists concisely with list comprehension, applying loops and optional conditions to transform items; compare list results with generator expressions to improve memory efficiency.

  • List comprehensions part 26:36

    Explore how to generate (x, y) points from coordinate lists using list comprehensions in Python, compare with explicit loops, and learn about tuples, generators, and two dimensional iteration.

  • Dictionary comprehension and zip with dict comprehension4:39

    Explore dictionary comprehension and how to combine it with zip to build key-value dictionaries from paired lists, including conditional filtering and mapping countries to capitals.

  • Set comprehensions and various operations on set12:19

    Explore python sets, their uniqueness and hash behavior, and master set comprehension along with operations like union, intersection, difference, and symmetric difference.

  • Zip utility for parallel iteration8:12

    Learn how the Python zip utility enables parallel iteration by pairing elements from multiple lists, with zip and zip longest, handling missing values via fill values and default shortest behavior.

  • create your own zip utility using list, tuple and loop13:34

    Implement a custom zip utility in Python that pairs elements from two lists using the minimum length, then extend to handle multiple lists with star arguments and tuples.

  • generators and iterators part 116:50

    This lecture explains iterable, iterator, and generator concepts, showing how yield enables on-the-fly values with next or for loops to avoid large memory loads, with practical examples.

  • generators and iterators part 23:39

    Learn how generators and iterators work in Python in part 2, including using next() with a generator, how a for loop auto-advances, and handling stop iteration.

  • generators and iterators part 38:53

    Explore how generators and iterators fetch elements with next and __next__, and how iter converts lists into iterables. Learn when to use for loops versus while loops and StopIteration handling.

  • Implementing __next__ for custom iterator class10:23

    Learn to implement a custom iterator by defining a next method, returning the current value, and raising StopIteration to bound the range from start to end for loops.

  • Generator performance with memory profiler and psutil11:26

    Explore how iterators and generators save memory through lazy evaluation, comparing lists with and without them, and measure memory using memory profiler and psutil.

  • map, reduce, filter, lambda13:21

    Explore how Python's map, filter, and reduce functions transform and condense data using lambda expressions, with examples from doubling numbers 1-20, filtering by divisibility by three, and summing with reduce.

  • map, filter, reduce, lambda problem and solution7:31

    Convert degree values to radians using map and lambda, filter obtuse angles greater than 90 degrees, and compute the sum of angles with the radius function.

Requirements

  • Familiarity with one programming Language and a PC

Description

This course is for both the beginner and intermediate level with emphasis on practical approach and coding along with the tutorial.

The course demonstrates small set of independent program to demo a feature and later I stitch together concepts learnt to create medium complexity project.

The course is from beginner level but the student needs to have idea or familiarity with at-least one programming language.

Detailed understanding of the Python Language.

Detailed tutorial and internals of List, Dictionary, Sets, Tuples.

Detailed File Handling like reading/writing/opening. Several mini Project on Python.

Installation and development guide on Python.String Manipulation.

Detailed description and handling of Functions. Detailed description of Python Modules and how to write modules of your own.

Periodic updates on python news and new development. Future updates with lots of stuff like web scraping, youtube downloading and other stuff.

Operating system interfacing modules like OS and os.path

Demonstration of post, get for the rest client handling.

Writing Rest API backend with the Python.

Demo of the project in python for checking if the system is alive using the ping utility from within python program.

Demo of the project using the argparse, IPNetwork, netaddr, threads to do ping discovery for alive system.

Small Demo of the flask, although flask will not be covered extensively as its not a flask course.

This would be a dynamic and ever evolving course on python and new stuff will be posted very periodically.

I am planning to later cover the stock API and stock data fetch particularly from the polygon dot io for those who are interested, although this is currently not part of the program and will be added later.



Who this course is for:

  • Students, Data scientist and Automation engineer