Pybites Logo

Regular Bite Exercises

The bread and butter of the Pybites Platform, these Regular Bite Exercises will keep you challenged for quite some time.

Don't be disheartened if you get stuck. These are real world exercises that are designed to push you. If you find yourself absolutely stuck, feel free to post in our Community and ask for help.

Level Name Tags
Beginner Sum n numbers sum None default args range
Beginner Parse a list of names lambda min list comprehensions sorting
Beginner Rotate string characters slicing deque
Beginner Enumerate 2 sequences enumerate string formatting
Beginner Pybites date generator generators datetime
Beginner Write a property datetime properties
Beginner Query a nested data structure data structures sorting dictionary comprehensions list comprehensions 100days
Beginner Dictionary comprehensions are awesome dictionary comprehensions 100days
Beginner Martin's iq test enumerate string module
Beginner Don't let mutability fool you mutability deepcopy
Beginner Rewrite a for loop using recursion reverse recursion
Beginner Using elementtree to parse xml movie data xml
Beginner Force keyword arguments function arguments kwargs
Beginner License key generator secrets string module list comprehensions
Beginner Keep a queue of last n items deque
Beginner You are a programmer! code fizz buzz fizzbuzz
Beginner Nicer formatting of a poem or text string manipulation textwrap
Beginner Get the latest game releases from steam's rss feed feedparser namedtuple
Beginner Add a command line interface to our bmi calculator argparse
Beginner Fix a truncating zip function itertools zip 100days
Beginner Calculate the running average of a sequence enumerate itertools mean
Beginner Working with datetimes datetime timedelta 100days
Beginner Remove punctuation characters from a string string module string manipulation
Beginner What day of the week were you born on? calendar
Beginner New places to travel to set set operations
Beginner Check equality of two lists equality list enum
Beginner At what time does pybites live? timezones zoneinfo
Beginner Matching multiple strings string matching all any
Beginner Build unix' wc program in python file processing Unix tempfile
Beginner Display the last part of a file (unix tail) file processing strip Unix slicing
Beginner Count leading spaces string matching counting
Beginner Round a number even (a.k.a. banker's rounding) Decimal rounding
Beginner Work with datetime's strptime and strftime datetime strptime strftime 100days
Beginner Analyze some basic car data data analysis set Counter list comprehensions
Beginner Convert an amazon url into an affiliation link string manipulation regular expressions
Beginner Bloodtypes exception handling multi type input enum
Beginner Look up a value in 3 dictionaries collections dict
Beginner Sorting words with constraint lambda string manipulation sorting
Beginner Round a sequence of numbers math rounding list comprehensions
Beginner Count the number of files and directories counting directories files os module
Beginner Parse an /etc/passwd file output string manipulation split tuple unpacking
Beginner Complete a user class: properties and representation dunder methods properties classes __repr__ string manipulation dunder methods f-strings __str__
Beginner Simple length converter rounding exception handling numbers
Beginner Having fun with python partials rounding partial functools
Beginner Create a variable length chessboard modulo stdout range
Beginner Group names by country groupby collections defaultdict
Beginner Keep a list sorted upon insert bisect data structures classes __str__
Beginner Get statistics from pybites test code file processing data analysis statistics
Beginner Filter a list of names generators break continue looping
Beginner Some logging practice logging callable
Beginner Find the number pairs summing up n looping itertools numbers
Beginner Write a sphinx docstring docstring data types sphinx
Beginner Add type hints to a function typing type hinting annotations
Beginner A countdown generator generators
Beginner Validate a license key bool regular expressions
Beginner Create a sandwich decorator decorators
Beginner Swap case pybites characters string manipulation looping string parsing
Beginner Where are the emojis? regular expressions looping emojis list comprehensions list
Beginner Write tests for fibonacci fibonacci pytest
Beginner Write tests for list_to_decimal exception handling pytest
Beginner Test print / standard output stdout list comprehensions capfd capsys pytest
Beginner Introducing pandas series string module series pandas
Beginner Let's play with pandas series slicing pandas type hinting series numpy
Beginner Global vs local variables sum global
Beginner Extract users dict from a multiline string string parsing dict
Beginner Gc content bioinformatics collections
Beginner Most frequent digit in number counting numbers Counter
Beginner Major and minor numbers min numbers collections max
Beginner Armstrong numbers numbers algorithms
Beginner Like there's no tomorrow? datetime
Beginner Smallest number numbers
Beginner Round to next number math
Beginner N digit numbers numbers
Beginner Join lists iteration joining list
Beginner Print names to columns modulo f-strings print
Beginner Pickling objects data wrangling pickle serialization
Beginner Decode base64 encoded data base64 encode decode
Beginner Identity and equality staticmethod integer caching equality
Beginner Reading progress datetime numbers
Beginner Iterables intersection functools set operations
Beginner Pretty string pprint
Beginner Fastapi hello world FastAPI
Beginner A little detour: pydantic Pydantic FastAPI
Beginner Which words can you type with one hand? comparison set enum
Beginner Transform a script into a command line interface (cli) Typer command line
Beginner Create your first typer command line interface (cli) application Typer command line
Beginner Add a progress bar to your command line interface (cli) Typer rich command line
Beginner Python3.9 - dictionary merge union dict
Beginner Validate pangram strings hashing string algorithms
Beginner Reverse only letters strings stacks queues
Beginner Uppercase Vowels loops string manipulation strings Hacktoberfest
Beginner Subclassing: Vehicles in Motion subclassing super classes inheritance
Beginner Your First SQLModel Tables databases SQLModel ORM sqlite3
Beginner Session Management & Basic Inserts Session SQLModel ORM sqlite3
Beginner Reading Data with Select queries SQLModel ORM sqlite3
Beginner Update and Delete Operations SQLModel ORM sqlite3 CRUD
Beginner One-to-Many Relationships SQLModel ORM sqlite3 Relationships Foreign Keys
Intermediate Word values sum Scrabble max
Intermediate Top 10 pybites tags xml Counter
Intermediate Pybites die hard generators file processing Counter namedtuple
Intermediate Parsing dates from logs file processing datetime 100days
Intermediate Palindromes reverse list comprehensions algorithms max
Intermediate Practice exceptions exception handling raise
Intermediate Write a user validation function exception handling classes namedtuple
Intermediate Convert dict to namedtuple/json json dict namedtuple
Intermediate Generate a table of n sequences generators zip
Intermediate Form teams from a group of friends itertools 100days
Intermediate Find the most common word data analysis Counter list comprehensions
Intermediate Write a decorator with argument decorators 100days
Intermediate No promo twice, keep state in a class exception handling properties classes
Intermediate Parse omdb movie json data movie data json APIs glob
Intermediate Converting date strings to datetimes datetime findall Counter
Intermediate Movie data analysis data analysis mean defaultdict movie data sorting namedtuple
Intermediate Transpose a data structure zip dict
Intermediate Having fun with heapq datetime heapq
Intermediate Having fun with *args and **kwargs args function arguments kwargs
Intermediate Calculate the total duration of a course datetime numbers findall timedelta
Intermediate Write a login_required decorator decorators functools
Intermediate Write a new password field validator string module re
Intermediate Make a bar chart of new safari books data analysis bar chart
Intermediate Scrape packt's html with beautifulsoup beautifulsoup requests namedtuple
Intermediate When does python 2 die on planet miller? datetime
Intermediate Create a simple calculator that receives command line arguments reduce argparse functools
Intermediate Create a multiplication table class of variable length exception handling numbers dunder methods classes
Intermediate Create a deck of uno cards namedtuple list list comprehensions
Intermediate Data structures matter - speed up your python code performance data structures
Intermediate Get all valid dictionary words for a draw of letters itertools set Scrabble 100days
Intermediate Create your own iterator iterators random
Intermediate Keep state in a class + make its instance callable dunder methods classes
Intermediate Retrieve the right ninja belt based on score OrderedDict itertools
Intermediate Organize a meeting between timezones timezones zoneinfo
Intermediate Find programmers with common languages set set operations
Intermediate Parse a csv file and create a bar chart bar chart requests csv community
Intermediate Filter and order tweets by polarity values TextBlob Twitter namedtuple
Intermediate Define a score enum and customize it adding methods classmethod enum __str__
Intermediate Flatten lists recursively (droste bite) recursion list
Intermediate Create a rgb-to-hex converter string formatting
Intermediate Convert decimal to roman numerals OrderedDict numbers
Intermediate Playing with lists and dicts data structures list dict 100days
Intermediate What south park characters talk most? data analysis Counter requests csv defaultdict
Intermediate Humanize a datetime datetime namedtuple
Intermediate Subclass the dict built-in classes inheritance dunder methods
Intermediate Beautifulsoup ii - scrape us holidays beautifulsoup dict defaultdict
Intermediate Write an infinite sequence generator generators itertools string module zip
Intermediate Use the ipinfo api to lookup ip country mock.patch json requests APIs
Intermediate Filter words with non-ascii characters ascii all ord unicode
Intermediate Implement a color class with staticmethod __repr__ hex string module staticmethod __str__
Intermediate List and filter files in a directory generators glob os module
Intermediate List exercise: return first occurrence indices of duplicated words counting set list comprehensions
Intermediate Xmas tree generator range string formatting default args join
Intermediate Write a numbers validation decorator decorators
Intermediate Check if two words are anagrams string matching anagram
Intermediate Find the user with most friends sorting looping tuples defaultdict
Intermediate Get the most recommended books default args beautifulsoup Counter list comprehensions requests
Intermediate Return the right ordinal suffix for a number modulo numbers string manipulation dict
Intermediate Analyze stock data counting data analysis string manipulation requests json sorting
Intermediate Find the word with the most vowels lambda string matching counting list comprehensions
Intermediate Sort a list of book objects lambda operator datetime attrgetter list sorting namedtuple
Intermediate Gourmets' nightmare operator sorting intersection Counter
Intermediate Oop fun at the zoo classmethod itertools classes __str__
Intermediate Pybites first pandas bite data analysis csv pandas
Intermediate Primitive date format inferrer classmethod datetime exception handling enum
Intermediate Exception handling: calculate the winning player exception handling numbers namedtuple
Intermediate Calculate the number of months passed datetime exception handling dateutil
Intermediate Rhombus generator string formatting format f-strings
Intermediate 100 weekdays of code date range datetime dateutil
Intermediate Print car data grouped by manufacturer operator data structures itertools sorting
Intermediate Turn messy csv into json re string manipulation csv pandas json
Intermediate Contemporary composers exception handling generators datetime dict namedtuple
Intermediate Write your own data class data structures type hinting dataclasses hashable sorting
Intermediate Split a string by spaces or quoted text string manipulation split
Intermediate Make an index of story characters enumerate string matching collections defaultdict sorting
Intermediate Filter out accented characters string matching unicode
Intermediate Create a simple calculator operator exception handling numbers
Intermediate Vertically align output of counters string formatting
Intermediate Which packages were upgraded? comparison numbers string manipulation dict
Intermediate Complete a tox ini file parser class configparser tox properties classes string parsing string matching
Intermediate Set up future notifications datetime timedelta findall f-strings
Intermediate Find missing dates datetime pandas dateutil
Intermediate Parse pybites blog git commit log string parsing data analysis Counter datetime dateutil
Intermediate Parse a bunch of quotes from html string manipulation regular expressions string parsing dict
Intermediate Analyze some bite stats data data analysis set csv Counter
Intermediate Create a simple spelling suggester SequenceMatcher string matching difflib
Intermediate Calculate number of books to have read at date ... datetime exception handling dateutil
Intermediate Actor/actress age at movie release dataclasses f-strings dateutil
Intermediate Parse income distribution from latin america xml xml data analysis defaultdict
Intermediate Starwars character with highest bmi operator string manipulation tuple unpacking max
Intermediate Most upvoted stackoverflow python questions beautifulsoup string matching web scraping requests sorting
Intermediate Add caching to a fibonacci function performance fibonacci cache functools
Intermediate Analyze nba data with sqlite3 databases data analysis SQL sqlite3
Intermediate What date is mother's day celebrated? datetime dateutil
Intermediate Multiple inheritance (__mro__) multiple inheritance __mro__ classes inheritance
Intermediate Call a cisco nexus 9k device networking requests
Intermediate Analyze some bite stats data - part ii data analysis sorting csv
Intermediate Add type hints to a class dataclasses type hinting classes
Intermediate Female speakers @ pycon us beautifulsoup counting gender_guesser data wrangling
Intermediate Calculate and evenly split the bill Decimal rounding numbers
Intermediate Suppressing exceptions context managers exception handling
Intermediate Capture stdout context managers StringIO
Intermediate Bite notification planner generators datetime
Intermediate Parse best selling lists using the ny times api json mock requests APIs
Intermediate Split an iterable in groups of size n generators iterators itertools looping
Intermediate Unix file permissions string manipulation dict list comprehensions
Intermediate Get top titles from news.python.sc string parsing beautifulsoup news web scraping requests sorting namedtuple
Intermediate Convert warcraft json data to csv json exception handling csv
Intermediate Create a gravatar url string formatting hashlib gravatar
Intermediate Thumbs up for operator overloading exception handling classes emojis dunder methods operator overloading
Intermediate Analyze gold prices comparison string parsing data analysis looping pandas sorting
Intermediate Make a zipfile of the latest log files pathlib datetime zipfile os module
Intermediate Capitalize sentences string matching string manipulation regular expressions string parsing
Intermediate Which bite has the fastest tests? sorting string parsing type casting
Intermediate User experience matters! suggest matching files pathlib files difflib
Intermediate Test fizzbuzz fizzbuzz pytest
Intermediate Test code that parses json and ip ranges dataclasses ipaddress json pytest
Intermediate Make mutpy's output more digestible data wrangling string parsing looping string matching mutpy
Intermediate Xmas tree 2.0 string formatting range
Intermediate Mocking a standard library function pytest random mock.patch
Intermediate More pandas series practice math series statistics pandas
Intermediate Codon usage bioinformatics textwrap collections
Intermediate Scrape pycon events beautifulsoup data analysis web scraping requests pycon json namedtuple
Intermediate What the flux? math finance pandas
Intermediate Reverse complement bioinformatics translate string manipulation
Intermediate Visit all pycons in europe math dataclasses itertools data analysis
Intermediate Count the number of islands in a grid looping algorithms string
Intermediate Clamy fernet typing encryption fernet cryptography dataclasses encode
Intermediate Optimal fund raising math looping algorithms
Intermediate Measure the size of an island math looping algorithms
Intermediate Get all class names from a module inspect list comprehensions
Intermediate Find common words string matching algorithms set operations
Intermediate Number conversion problem numbers recursion algorithms
Intermediate Get the most common email domains string parsing Counter web scraping set requests
Intermediate Pascal triangle Pascal algorithms
Intermediate Nested list extraction data structures string parsing
Intermediate Decompress string manipulation recursion
Intermediate Sum indices sum looping
Intermediate Class rosters data conversion csv string parsing tuple unpacking
Intermediate Find the fastest speech string manipulation datetime sorting
Intermediate Jagged list iteration itertools list
Intermediate Fasta to 2-line fasta bioinformatics biopython
Intermediate Base converter exception handling base
Intermediate Exchange rates datetime sorting dict
Intermediate Get and write all code from a json file file processing json string manipulation filecmp
Intermediate Most identical letters in a word string matching casefold Counter max
Intermediate Split once, delimit many looping split string parsing
Intermediate Translate coding sequences to proteins bioinformatics biopython
Intermediate Sqlite3 introduction databases SQL sqlite3
Intermediate Calculate the median from a dictionary sum sorting median
Intermediate A simple document class properties classes annotations string method chaining
Intermediate Scoring objects typing builtins keyword importlib
Intermediate Alternative constructors classmethod classes
Intermediate More logging practice logging exception handling
Intermediate To rent or to stream movies? typing datetime collections dict
Intermediate Sortable dataclasses and enums dataclasses sorting dunder methods enum
Intermediate Floating point arithmetic floats rounding numbers arithmetic
Intermediate Abstract syntax tree (ast) printer AST
Intermediate Searching for an apartment algorithms
Intermediate Simple tcp client hashlib TCP/IP client socket multiprocessing secrets networking
Intermediate Async http client asyncio networking aiohttp client
Intermediate Create food objects FastAPI
Intermediate Retrieve food objects FastAPI
Intermediate Update and delete food objects FastAPI
Intermediate Pydantic part ii Pydantic FastAPI
Intermediate Food logging crud FastAPI
Intermediate Fastapi exception handling FastAPI
Intermediate Return an html response FastAPI
Intermediate Citation indexes typing exception handling builtins
Intermediate Writing better spanish ascii unicode dict unicodedata
Intermediate Get spelling suggestions typing TextBlob comparison tuple unpacking namedtuple
Intermediate Hash sql statements hashlib SQL
Intermediate When to use command line option (cli) options and when cli arguments? Typer command line
Intermediate Using typer callbacks to create command line interface (cli) parameters Typer command line
Intermediate Rich excursion - create beautiful tables Typer rich command line
Intermediate Add a password prompt to your command line interface (cli) Typer command line
Intermediate Movie theater (refactoring) clean code refactoring
Intermediate Create wikipedia lorem ipsum text regular expressions beautifulsoup list comprehensions random requests
Intermediate Rolling two dice for an advantage math itertools mean
Intermediate Goal tracker datetime date tuple unpacking
Intermediate Add pi day to the calendar calendar tuple unpacking
Intermediate Group anagrams array strings defaultdict
Intermediate Find all letter combinations of a phone number backtracking itertools strings
Intermediate Coins on the table math
Intermediate String to Index Index-based encoding range generation string manipulation
Intermediate Implement the Repository Pattern for a Book Library Repository Pattern SQLModel csv sqlite3 design patterns files
Intermediate Unix Tail Part II - Make it Faster! file processing performance bytes looping
Intermediate Many-to-Many Relationships SQLModel Many-to-Many Link Tables ORM sqlite3
Intermediate Advanced Link Table Relationships SQLModel ORM sqlite3 Link Tables Complex Queries
Intermediate Model Inheritance and API Schemas Model Inheritance SQLModel API Schemas Pydantic
Advanced Regex fun re findall regular expressions
Advanced Enrich a class with dunder methods dunder methods properties functools
Advanced Write a context manager operator overloading context managers dunder methods with statement
Advanced Find words that are > 95% similar file processing findall difflib SequenceMatcher itertools
Advanced Abc's and class inheritance abstractmethod ABCs classes inheritance
Advanced Matrix multiplication / @ operator operator overloading __matmul__ dunder methods
Advanced Building a karma app - implement the user class properties classes dunder methods operator overloading namedtuple
Advanced Write a binary search algorithm algorithms binary search
Advanced Number guessing game class random games classes
Advanced Make a little pybites search engine (feedparser) list comprehensions feedparser any search namedtuple
Advanced Convert text into multiple columns string manipulation
Advanced Using argparse to interface with a grocery cart argparse
Advanced Create a variable size paw patrol card deck with random actions itertools random string module namedtuple
Advanced Use an infinite iterator to simulate a traffic light iterators itertools namedtuple
Advanced Regex fun - part ii re regular expressions
Advanced Parse unix cal to a weekday mapping re Unix zip
Advanced The singledispatch countdown challenge singledispatch decorators functools
Advanced Write a score property properties classes
Advanced Write a performance monitoring context manager context managers Counter
Advanced Rock-paper-scissors and generator's send random games coroutines
Advanced Parse pycon talk data from youtube list comprehensions namedtuple max
Advanced Code your way out of a grid numbers looping tuple unpacking namedtuple
Advanced Social media username validator typing re regular expressions string manipulation range string matching namedtuple
Advanced Determine the strength of a password string matching re
Advanced Marvel data analysis sum rounding data analysis Counter list comprehensions csv
Advanced The emoji (unicode) bite unicode emojis sys
Advanced Screen scraper regular expressions string manipulation index dict slicing
Advanced Two sums index sum sorting looping
Advanced Calculate a coding streak in days datetime string manipulation timedelta
Advanced Record breakers data analysis csv pandas
Advanced Manipulate string decorator kwargs string manipulation decorators list
Advanced Subclass the list built-in exception handling properties dunder methods mean inheritance operator overloading list statistics median
Advanced 15-way rock paper scissors exception handling games csv dict
Advanced Cli tool: html link converter (stdin to stdout) data wrangling exception handling html stdin string formatting string manipulation sys
Advanced Ninja rankings classes bisect heapq tuples dunder methods dataclasses
Advanced String manipulation and metrics properties string formatting translate string manipulation Counter list comprehensions dataclasses
Advanced Analyze mcdonald's food data data analysis pandas
Advanced Make a terminal spinner animation stdout itertools command line time sys
Advanced Use pandas to find most common genres in a movie excel sheet data cleaning excel groupby pandas movie data
Advanced Strip comments from python code regular expressions string parsing comments
Advanced Analyze sales data with pandas data analysis pandas groupby
Advanced Create a js-like dict object javascript classes dict inheritance
Advanced Calculate my mac's longest uptime data wrangling datetime string parsing dateutil
Advanced 🥳 minecraft enchantable items beautifulsoup web scraping
Advanced Pomodoro with asyncio pomodoro asyncio
Advanced Cached property decorator caching decorators properties classes
Advanced Write a retry decorator exception handling decorators
Advanced Code a translation fixer regular expressions
Advanced Parse an email header regular expressions
Advanced Analysing @pythonbytes rss feed regular expressions classes max min Counter string matching feedparser type hinting namedtuple
Advanced Get sentences from a text data wrangling string manipulation regular expressions
Advanced Scrape best programming books data wrangling classes beautifulsoup data cleaning books web scraping sorting
Advanced Get the dates ninja belts were earned looping datetime pandas json sorting
Advanced Write tests for an account class pytest classes
Advanced Zodiacal data parsing datetime pytest fixtures
Advanced Test a number guessing game exception handling classes games mock.patch pytest
Advanced Test a movie db class classes fixtures SQL sqlite3 movie data pytest
Advanced Pybites url shortener string module string manipulation type hinting dict encode decode
Advanced Let's play with pandas dataframes dataframes pandas
Advanced Composition, inheritance, abstract base class, what? typing ABCs abstractmethod beautifulsoup string formatting composition urllib inheritance web scraping dataclasses namedtuple
Advanced Taxable income calculator typing finance properties classes dataclasses namedtuple
Advanced Number transformers numbers algorithms
Advanced Shortest path (graph bite) graph computer science algorithms
Advanced Get father's days by date and country string manipulation string parsing dateutil
Advanced Number of coin changes dynamic programming algorithms
Advanced Regular expression lookahead/lookbehind regular expressions lookahead lookbehind
Advanced Generating sales reports from github data data analysis pandas
Advanced Evaluate a bridge hand exception handling properties classes looping sorting enum
Advanced Scoring matrices bioinformatics zip enumerate looping numbers
Advanced Bowling score looping numbers games
Advanced Rename keys iteration data cleaning dict
Advanced 🥳 pto calculator exception handling string formatting looping datetime calendar numbers
Advanced Unique genes bioinformatics biopython
Advanced Create file pairs bioinformatics regular expressions files
Advanced Magic bytes file processing exception handling images bytes string parsing csv
Advanced Ast visitor AST
Advanced Longest coding streak fromordinal itertools toordinal timezones
Advanced Convert dict keys to snake case string manipulation recursion algorithms
Advanced Simple math equation solver exception handling itertools list operations operator math
Advanced Convolution in neural networks deep learning numpy
Advanced Metropolis–hastings algorithm statistics algorithms numpy Markov chain Monte Carlo
Advanced Fastapi authentication with jwt (json web tokens) FastAPI
Advanced Learn to handle cron schedule expressions exception handling iteration datetime crontab dataclasses
Advanced Art thief memoization graph recursion
Advanced Organizational chart binary tree depth-first search graph traversal
Advanced Hedge maze graph traversal maze breadth-first
Advanced FastAPI Integration - Basic Endpoints Dependency Injection SQLModel FastAPI REST API
Advanced FastAPI Integration - Complex Queries SQLModel FastAPI REST API Complex Queries