Pythonic Python Part I: The Basics

Fast and fun python lectures for programmers, with tons of example code; plenty of exercises, and explained solutions.
4.1 (22 ratings)
Instead of using a simple lifetime average, Udemy calculates a
course's star rating by considering a number of different factors
such as the number of ratings, the age of ratings, and the
likelihood of fraudulent ratings.
429 students enrolled
Take This Course
  • Lectures 28
  • Length 3 hours
  • Skill Level Intermediate Level
  • Languages English
  • Includes Lifetime access
    30 day money back guarantee!
    Available on iOS and Android
    Certificate of Completion
Wishlisted Wishlist

How taking a course works


Find online courses made by experts from around the world.


Take your courses with you and learn anywhere, anytime.


Learn and practice real-world skills and achieve your goals.

About This Course

Published 2/2013 English

Course Description

This is Pythonic Python - Part I of a complete Python course for programmers, in four parts.

The focus, besides learning Python, is learning Pythonic idioms so that your code is beautiful, easy to read and modify, and fast-running.

The Syllabus:

Part I - The Python Basics

Make yourself useful.

  • lab 01 Birds Eye View
  • lab 02 Branching and Looping
  • lab 03 Input and Exceptions
  • lab 04 Formatting Strings
  • lab 05 Functions
  • lab 06 import
  • lab 07 Attribute Scope
  • lab 08 Flexible Functions
  • lab 09 Sequence Slicing
  • lab 10 Sequence Accumulating
  • lab 11 Sequence Differences
  • lab 12 list Facilities
  • lab 13 Sequences And Mutability
  • lab 14 sys Library

Part II The Buzz

Heavy-hitting, time-saving, fun facilities.

  • lab 15 Reuse Trick
  • lab 16 list Scope Issue
  • lab 17 Arguments And Mutability
  • lab 18 list Comprehensions
  • lab 19 Functional Programming
  • lab 20 from importing
  • lab 21 Dictionaries
  • lab 22 Dictionary Marvels
  • lab 23 Variable Arguments Protocols
  • lab 24 raise An Exception
  • lab 25 File IO
  • lab 26 os Module
  • lab 27 Packages
  • lab 28 Dynamic Code
  • lab 29 Decorators
  • lab 30 Generators

Part III Pythonic OOP

So brilliant, you might need shades.

  • lab 31 Classes
  • lab 32 Containment
  • lab 33 Inheritance
  • lab 34 Multiple Inheritance
  • lab 35 Magical Powers
  • lab 36 Privacy And Introspection
  • lab 37 Class Attributes and Scope
  • lab 38 New Style Classes
  • lab 39 Iteration Support
  • lab 40 Attribute Control
  • lab 41 Static and Class Methods
  • lab 42 Context Manager

Part IV The Expert

Know it all.

  • lab 43 Deep Copies
  • lab 44 Piping With subprocess
  • lab 45 File Pattern globbing
  • lab 46 Timing Your Code
  • lab 47 unittest Frameworks
  • lab 48 Option Parsing Frameworks
  • lab 49 Catching Exceptions
  • lab 50 Raising Exceptions
  • lab 51 Inventing Exceptions
  • lab 52 Namespace Review
  • lab 53 Pitfalls
  • lab 54 Finding Modules

What are the requirements?

  • The Python 2 interpreter running on your computer, any operating system. The interpreter is available for free at
  • A Python development environment. Perhaps your favorite environment can be made to be Python-aware. The "Idle" development environment comes into your computer when you bring in the Python interpreter. Use that if you don't already have a favorite environment.

What am I going to get from this course?

  • A conscientous and talented student, upon completion of the entire Pythonic Python course will be an expert in the core of Python, and in Pythonic code, bringing maximum efficiency for programmer and program alike.
  • A student who needs less expertise for now, and who sees this material as a smogasboard of "too much", can learn as much of Python as suits.
  • From this Part I, a student will become familiar in a Python development environment, deal with stdio and error handling, branching, looping, and function protocols; and be ready to use any of the thousands of Python 2 libraries.

Who is the target audience?

  • Software programmers who already know at least one programming language.

What you get with this course?

Not for you? No problem.
30 day money back guarantee.

Forever yours.
Lifetime access.

Learn on the go.
Desktop, iOS and Android.

Get rewarded.
Certificate of completion.


Welcome!  And suggestions for making the best use of this course.  
The Supplementary Material here is the pdf for all 14 labs, and all the code.
Section 1: Birds Eye View
A bird's eye view of code to see the structure, the memory model, and get started in your environment.
Lab 1 Solutions
Section 2: Branching and Looping
Flow-of-control syntax in Python.
Lab 2 Solutions
Section 3: Input and Exceptions
Work with your user and deal with errors the user makes.
Lab 3 Solutions
Section 4: Formatting Strings
Replacement into string via the % operator -- Python style, and a discussion of the integer-division-issue.

Lab 4 Solutions
Section 5: Functions
First look at function protocols. 
Lab 5 Solutions
Section 6: Imports
Use any of the thousands of libraries and packages available for Python, and start loving introspection.
Lab 6 Solutions
Section 7: Attribute Scope
Surprising generosity of scoping for global identifiers.
Lab 7 Solutions
Section 8: Flexible Functions
Get more flexibility with default and keyword arguments.
Lab 8 Solution
Section 9: Sequence Slicing
Fun facility for extracting pieces of a sequence.  Note that there is an experiential exercise that doesn't not need a solution here.
Section 10: Sequence Accumulating
+= on sequences, a very useful technique.
Lab 10 Solutions
Section 11: Sequence Differences
Why three sequence types? String manipulation.
Lab 11 Solutions
Section 12: List Facilities
The list: a powerful data-handler.
Lab 12 Solutions
Section 13: Sequences and Mutability
A deeper understanding of mutability.

The exercises are experiential, so there is no video for the solutions.

Section 14: SYS Library
Reading the command line, and direct access to stdout, stderr, and stdin.
Lab 14 Solutions
Section 15: Wrap Up: Pythonic Python Part I: The Basics
Thank you for being with me.  I hope you had fun learning the basic facilities and I look forward to seeing you in Part I: The Buzz.

Students Who Viewed This Course Also Viewed

  • Loading
  • Loading
  • Loading

Instructor Biography

Marilyn Davis, Ph.D., Python Trainer

Marilyn is a well-regarded Python Trainer for the Industry, and a well-loved Python Instructor for UCSC-Extension in the Silicon Valley.  Her history shows her to be an accomplished software engineer as well, demonstrating a knack for finding simple solutions to complex problems, articulating clear explanations, and engendering cooperation.

Dr. Davis earned her degree from UCSD in Theoretical Radio Astronomy.  In the course of that work, her interest shifted to Software Engineering.  She has worked with many different computer languages, and has made software for Computer-Aided Instruction, Astronomy, Statistics, Environmental Research, Operations Research, Email Service, and Electronic Democracy.  

Marilyn was an early contributor to the Open Source movement, authoring eVote/Clerk, software for consensus-building and decision-making on the network.  Her PC Planetarium was sold by the Sierra Club Catalogue.  Her early work in editing radio astronomy data is still in use today.  Her program Basic Primer was a pioneering work in Computer-Aided Instruction and was published by IBM.

Motivated by a love for teaching, she has taught Mathematics and Physics, as well as Software Engineering.  She taught C at UCSC-Extension for 14 years before she encountered Python.  Python has been her focus since her first sight of Python code.  She has been teaching and using Python since 2006.

Ready to start learning?
Take This Course