Python Exercises

As a Python Morsels user, your first task is to pick an exercise based on your preferred skill level (which you can change at any time). You'll receive weekly exercise recommendations based on your current skill level.

Here's the first exercise we recommend for each skill level:

Title Description
add

Sum up lists-of-lists of numbers

Preview
Circle

Class representing a Circle, with auto-updating attributes

Preview
count_words

Count occurrences of each word in a string

Preview
tail

Return last N items in a given iterable

Preview
parse_ranges

Parse comma-delimited numeric ranges

Preview

Plus 209 more exercises in the Mixed skill level.

Title Description
get_earliest

Return the earliest MM/DD/YYYY date string given

Preview
count_words

Count occurrences of each word in a string

Preview
add

Sum up lists-of-lists of numbers

Preview
BankAccount

Class representing a bank account with read-only balance

Preview
is_anagram

Determine whether the given words are anagrams

Preview

Plus 172 more exercises in the Novice skill level.

Title Description
Point

Class representing a 3-dimensional point

Preview
deep_flatten

Flatten deeply nested iterable-of-iterables

Preview
parse_ranges

Parse comma-delimited numeric ranges

Preview
suppress

Context manager that suppresses specific exceptions

Preview
OrderedSet

Set-like object that maintains insertion-order of items

Preview

Plus 154 more exercises in the Intermediate skill level.

Title Description
record_calls

Decorator that records calls to a function

Preview
deep_flatten

Flatten deeply nested iterable-of-iterables

Preview
tags_equal

Determine whether two HTML tags are equivalent

Preview
FuzzyString

String-like class supporting case-insensitive comparisons

Preview
suppress

Context manager that suppresses specific exceptions

Preview

Plus 108 more exercises in the Advanced skill level.

Sign Up Now or Log in and start claiming from the vault.