|Bite||Description & Tags|
|Bite 1. Sum n numbers||
Write a function that can sum up numbers:It should receive ...
default args None range sum
|Bite 2. Regex Fun||
Learn Python regular expressions by writing the following 3 functions. ...
findall re regular expressions
|Bite 3. Word Values||
Calculate the dictionary word that would have the most value ...
max Scrabble sum
|Bite 4. Top 10 PyBites tags||
Get the top 10 tags of PyBites. Our tests suppose ...
|Bite 5. Parse a list of names||
In this bite you will work with a list of ...
lambda list comprehensions min sorting
|Bite 6. PyBites Die Hard||
Given a listing of files of our community branch determine ...
Counter file processing generators namedtuple
|Bite 7. Parsing dates from logs||
In this bite we will look at this small server ...
datetime file processing
|Bite 8. Rotate string characters||
Write a function that rotates characters in a string, in ...
|Bite 9. Palindromes||
Write a function to determine if a word (or phrase) ...
list comprehensions max reverse
|Bite 10. Practice exceptions||
In this bite you learn to catch/raise exceptions.Write a simple ...
exception handling raise
|Bite 11. Enrich a class with dunder methods||
Let's enrich an Account class by adding dunder (aka special) ...
dunder methods properties
|Bite 12. Write a user validation function||
Create a function that takes a username and checks for ...
classes exception handling namedtuple
|Bite 13. Convert dict to namedtuple/json||
Write a function to convert the given blog dict to ...
dict json namedtuple
|Bite 14. Generate a table of n sequences||
Write a function that receives one or more sequences. The ...
|Bite 15. Enumerate 2 sequences||
Iterate over the given names and countries lists. In each ...
enumerate string formatting
|Bite 16. Special PyBites date generator||
Write a generator that returns special dates for PyBites: Every ...
|Bite 17. Form teams from a group of friends||
Write a function called friends_teams that takes a list of ...
|Bite 18. Find the most common word||
Write a function that returns the most common (non stop)word ...
Counter data analysis list comprehensions
|Bite 19. Write a simple property||
Write a simple Promo class. Its constructor receives a name ...
|Bite 20. Write a context manager||
Write a context manager to roll back a transaction on ...
context managers dunder methods with statement
|Bite 21. Query a nested data structure||
Given the provided cars dictionary:Get all JeepsGet the first car ...
data structures dictionary comprehensions list comprehensions sorting
|Bite 22. Write a decorator with argument||
Write a decorator called make_html that wraps text inside one ...
|Bite 23. Find words that are > 95% similar||
Given a list of tags of our blog find the ...
difflib file processing findall itertools SequenceMatcher
|Bite 24. ABC's and class inheritance||
ABC's or Abstract Base Classes are great to enforce a ...
ABCs abstractmethod classes inheritance
|Bite 25. No promo twice, keep state in a class||
In this bite a real world scenario: PyBites has a ...
classes exception handling properties
|Bite 26. Dictionary comprehensions are awesome||
A dictionary comprehension is like a list comprehension, but it ...
|Bite 27. Parse omdb movie json data||
Working with APIs is very common these days and lucky ...
APIs glob json movie data
|Bite 28. Converting date strings to datetimes||
In this Bite you are provided with a list of ...
Counter datetime findall
|Bite 29. Martin's IQ test||
Martin is preparing to pass an IQ test.The most frequent ...
enumerate string module
|Bite 30. Movie data analysis||
In this Bite we are going to parse a csv ...
data analysis defaultdict mean movie data namedtuple sorting
|Bite 31. Matrix multiplication / @ operator||
Since 3.5 Python has a binary operator to be used ...
dunder methods __matmul__
|Bite 32. Don't let mutability fool you||
In this Bite you are presented with a function that ...
|Bite 33. Transpose a data structure||
Sometimes you need to restructure a nested data structure. For ...
|Bite 34. Building a Karma app - implement the User class||
This Bite is about implementing a User class that keeps ...
classes dunder methods namedtuple properties
|Bite 35. Having fun with heapq||
In this Bite you are provided with 3 data structures: ...
|Bite 36. Having fun with *args and **kwargs||
Write a function called get_profile that takes:a required name,a required ...
args function arguments kwargs
|Bite 37. Rewrite a for loop using recursion||
Although you have to be careful using recursion it is ...
|Bite 38. Using ElementTree to parse XML||
In this Bite you will use ElementTree to parse some ...
movie data xml
|Bite 39. Calculate the total duration of a course||
In this Bite you read in a text file with ...
datetime findall numbers timedelta
|Bite 40. Write a binary search algorithm||
There are many ways to search for an item in ...
algorithms binary search
|Bite 41. Write a login_required decorator||
If you worked with Flask or Django you must have ...
|Bite 42. Number Guessing Game Class||
In this Bite you implement a Game class to perform ...
classes games random
|Bite 43. Force keyword arguments||
Write a function called get_profile that can only allows 2 ...
function arguments kwargs
|Bite 44. License key generator||
Write a function called gen_key that creates a license key ...
list comprehensions secrets string module
|Bite 45. Keep a queue of last n items||
How about writing a queue that holds the last 5 ...
|Bite 46. You are a programmer! Code Fizz Buzz||
Here is a beginner Bite to write Fizz Buzz: Fizz ...
|Bite 47. Write a new password field validator||
You know these Create a new password forms? They do ...
re string module
|Bite 48. Make a bar chart of new Safari books||
Some time ago we made a little Slack bot to ...
bar chart data analysis
|Bite 49. Scrape Packt's html with BeautifulSoup||
In this Bite you will parse Packt's free learning ebook ...
beautifulsoup namedtuple requests
|Bite 50. Make a little PyBites search engine (feedparser)||
Complete the program below to create a little search command ...
any feedparser list comprehensions namedtuple search
|Bite 51. When does Python 2 die on Planet Miller?||
Imagine you landed on Planet Miller (from the movie Interstellar) ...
|Bite 52. Create a movie quote API with Flask||
In this Advanced Bite you will implement a full-blown CRUD ...
APIs Flask movie data
|Bite 53. Convert text into multiple columns||
You run a news site and you got feedback that ...
|Bite 54. Nicer formatting of a poem or text||
In this Bite you complete print_hanging_indents to print a poem ...
string manipulation textwrap
|Bite 55. Get the latest game releases from Steam's RSS feed||
The Steam gaming platform has an RSS feed of their ...
|Bite 56. Add a command line interface to our BMI calculator||
Complete create_parser below so that our BMI program can be ...
|Bite 57. Create a simple calculator that receives command line arguments||
In this Bite you write a simple calculator that can ...
argparse functools reduce
|Bite 58. Using argparse to interface with a grocery cart||
Below is a Groceries class with add/delete/show/search methods.You as a ...
|Bite 59. Create a multiplication table class of variable length||
Danny does not like rote learning (nor do we!). He ...
classes dunder methods exception handling numbers
|Bite 60. Create a deck of Uno cards||
In this Bite you will create a deck of Uno ...
list list comprehensions namedtuple
|Bite 61. Create a variable size Paw Patrol card deck with random actions||
The Paw Patrol card deck consists of 32 cards ranging ...
itertools namedtuple random string module
|Bite 62. Data structures matter - speed up your Python code||
In this Bite we provide you with 5 functions which ...
data structures performance
|Bite 63. Use an infinite iterator to simulate a traffic light||
Complete traffic_light using itertools.cycle to return an infinite iterator to ...
iterators itertools namedtuple
|Bite 64. Fix a truncating zip function||
Bert is in charge of organizing an event and got ...
|Bite 65. Get all valid dictionary words for a draw of letters||
This Bite focusses on the use of itertools. To that ...
|Bite 66. Calculate the running average of a sequence||
Write a function that takes a sequence of items and ...
|Bite 67. Working with datetimes||
This Bite involves solving two problems using datetime:We kicked off ...
|Bite 68. Remove punctuation characters from a string||
Complete remove_punctuation which receives an input string and strips out ...
string manipulation string module
|Bite 69. Regex Fun - part II||
It's time for another Regex one! (here is part I)In ...
re regular expressions
|Bite 70. Create your own iterator||
In this Bite you make an iterator called EggCreator by ...
|Bite 71. Keep state in a class + make its instance callable||
In this Bite you write a small class to keep ...
classes dunder methods
|Bite 72. Retrieve the right Ninja Belt based on score||
As you have probably seen on the new dashboard you ...
|Bite 73. Organize a meeting between timezones (pytz)||
Help PyBites community friends find a reasonable common time to ...
|Bite 74. What day of the week were you born on?||
Complete weekday_of_birth_date which takes a date object of a birthday ...
|Bite 75. Parse Unix cal to a weekday mapping||
In the last bite we return the weekday from a ...
re Unix zip
|Bite 76. The singledispatch countdown challenge||
We are stoked and grateful to have Martin have you ...
decorators functools singledispatch
|Bite 77. New places to travel to||
You want to find people who have as much exposure ...
set set operations
|Bite 78. Find programmers with common languages||
Similar as last Bite we do another comparison of sequences ...
set set operations
|Bite 79. Parse a csv file and create a bar chart||
We played a bit with the Slack API today and ...
bar chart community csv requests
|Bite 80. Check equality of two lists||
In this Bite we compare two list objects for equality, ...
enum equality list
|Bite 81. Filter and order tweets by polarity values||
In this Bite we collected some random tweets and populated ...
namedtuple TextBlob Twitter
|Bite 82. Define a Score Enum and customize it adding methods||
Starting Python 3.4 there is support for enumerations (not to ...
classmethod enum __str__
|Bite 83. At what time does PyBites live?||
Get to know pytz! pytz brings the Olson tz database ...
|Bite 84. Flatten lists recursively (Droste Bite)||
Complete flatten that takes a list of lists (which can ...
|Bite 85. Write an advanced property||
After Bite 19. Write a simple property let's write a ...
|Bite 86. Create a RGB-to-Hex converter||
Designer Mary wants to convert her CSS from statements like ...
|Bite 87. Convert Decimal to Roman Numerals||
Complete romanize that takes a decimal number and converts it ...
|Bite 88. Write a performance monitoring context manager||
It's time for Context Managers part II. In Bite 20 ...
context managers Counter
|Bite 89. Playing with lists and dicts||
In this Bite you are presented with a us_state_abbrev dict ...
data structures dict list
|Bite 90. What South Park characters talk most?||
Did we already tell you we love the collections module? ...
Counter csv data analysis defaultdict requests
|Bite 91. Matching multiple strings||
Catching up after #PyCon2018 ... in this Bite you do ...
all any re string matching
|Bite 92. Humanize a datetime||
In this Bite you will convert a timedelta object into ...
|Bite 93. Rock-paper-scissors and generator's send||
Generators are cool right?! Did you know you can send ...
|Bite 94. Parse PyCon talk data from YouTube||
PyCon2018 was awesome! But you clearly had to choose the ...
list comprehensions max namedtuple
|Bite 95. Subclass the dict built-in||
In this Bite you will subclass the dict built-in to ...
|Bite 96. Build Unix' wc program in Python||
In this Bite you will convert Unix' wc command into ...
file processing tempfile Unix
|Bite 97. BeautifulSoup II - scrape US bank holidays||
In this Bite we use BeautifulSoup to scrape US bank ...
beautifulsoup defaultdict dict
|Bite 98. Code your way out of a grid||
Given a 2D grid of equal length x and y, ...
looping namedtuple numbers tuple unpacking
|Bite 99. Write an infinite sequence generator||
Write a generator that produces the sequence [1, 'A', 2, ...
generators itertools string module zip
|Bite 100. Display the last part of a file (Unix tail)||
Complete the function below simulating Unix' tail, for example: $ ...
file processing slicing strip Unix
|Bite 101. f-strings and a simple if/else||
The latest way to print to the screen in Python ...
|Bite 102. Infinite loop, input, continue and break||
In this Bite we'll get you to take user input ...
break continue input mock.patch while
|Bite 103. Loop through a dictionary and pluralise a word||
You're given a dictionary of people and the number of ...
|Bite 104. Split and join||
Split up the message on newline (\n) using the split ...
|Bite 105. Slice and dice||
Take the block of text provided and strip off the ...
replace slicing split string module strip
|Bite 106. Strip out vowels and count the number of replacements||
In this Bite we'd like you to loop over the ...
counting regular expressions replace string manipulation Zen of Python
|Bite 107. Filter numbers with a list comprehension||
Complete the function below that receives a list of numbers ...
list comprehensions modulo
|Bite 108. Loop over a dict of namedtuples calculating a total score||
In this Bite you calculate the total amount of points ...
counting dict namedtuple
|Bite 109. Workout dict lookups and raising an exception||
In this Bite you learn how to lookup values from ...
dict exception handling format pytest string manipulation ternary
|Bite 110. Type conversion and exception handling||
In this Bite you complete the divide_numbers function that takes ...
exception handling raise type casting
|Bite 111. Use the ipinfo API to lookup IP country||
In this Bite you will use the requests library to ...
APIs json mock.patch requests
|Bite 112. Social Media Username Validator||
In this Bite you parse social_platforms below into a dict ...
namedtuple range re regular expressions string manipulation string matching typing
|Bite 113. Filter words with non-ascii characters||
In this Bite you extract words from a text that ...
all ascii ord unicode
|Bite 114. Implement a Color class with classmethods||
As the new junior developer, you have been charged with ...
classmethod hex __repr__ __str__ string module
|Bite 115. Count leading spaces||
A small but interesting Bite: given a string with leading ...
counting string matching
|Bite 116. List and filter files in a directory||
In this Bite you complete get_files that receives a dirname ...
generators glob os module
|Bite 117. Round a number even (a.k.a. banker's rounding)||
Bankers Rounding is an algorithm for rounding quantities to integers, ...
|Bite 118. List exercise: return first occurrence indices of duplicated words||
In this Bite you are presented with a list of ...
counting list comprehensions set
|Bite 119. Xmas tree generator||
In this Bite you complete generate_xmas_tree that takes a rows ...
default args join range string formatting
|Bite 120. Write a numbers validation decorator||
Let's get some more practice with decorators ... in this ...
|Bite 121. Determine the strength of a password||
In this Bite you evaluate the strength of a password. ...
re string matching
|Bite 122. Check if two words are anagrams||
An anagram is a word or phrase formed by rearranging ...
anagram string matching
|Bite 123. Find the user with most friends||
In this Bite you are presented with a users dict ...
defaultdict looping sorting tuples
|Bite 124. Marvel data analysis||
Remember our Marvel Data Analysis / Alicante PyChallengeDay?We simplified this ...
Counter csv data analysis list comprehensions rounding sum
|Bite 125. Get the most recommended books||
The Tim Ferriss Show is full of wisdom and inspiration. ...
beautifulsoup Counter default args list comprehensions requests
|Bite 126. The Emoji (Unicode) Bite||
Python 3 supports Unicode so we can do cool stuff ...
emojis sys unicode
|Bite 127. Return the right ordinal suffix for a number||
In this Bite you complete a function that takes an ...
dict modulo numbers string manipulation
|Bite 128. Work with datetime's strptime and strftime||
In this Bite you get some more practice with datetime's ...
datetime strftime strptime
|Bite 129. Analyze Stock Data||
In this Bite we will answer some questions about stocks, ...
counting data analysis json requests sorting string manipulation
|Bite 130. Analyze some basic Car Data||
In this exercise you will analyze some basic car data. ...
Counter data analysis list comprehensions set
|Bite 131. Screen scraper||
This is the output from using screenFetch on my junky ...
dict index regular expressions slicing string manipulation
|Bite 132. Find the word with the most vowels||
Finish the get_word_max_vowels function below that takes a text string ...
counting lambda list comprehensions string matching
|Bite 133. Convert an Amazon URL into an affiliation link||
Can you help PyBites automate their Amazon affiliation link creation?Complete ...
regular expressions string manipulation
|Bite 134. Two Sums||
Given a random list of numbers, your task is to ...
index looping sorting sum
|Bite 135. Sort a list of book objects||
In this Bite you are going to look at a ...
attrgetter datetime lambda list namedtuple operator sorting
|Bite 136. Bloodtypes||
Check red blood cell compatibility between donor and recipient. For ...
enum exception handling multi type input
|Bite 137. Gourmets' Nightmare||
Many gourmets struggle to find the perfect pairing of wines ...
Counter intersection operator sorting
|Bite 138. OOP fun at the Zoo||
Finish the Animal class below adding one or more class ...
classes classmethod itertools __str__
|Bite 139. Calculate a coding streak in days||
In this Bite you are going to calculate the amount ...
datetime string manipulation timedelta
|Bite 140. PyBites First Pandas Bite||
This is a Pandas proof-of-concept Bite. We just added the ...
csv data analysis pandas
|Bite 141. Primitive date format inferrer||
Complete the get_dates method given the following:a listing of date ...
classmethod datetime enum exception handling
|Bite 142. Exception Handling: Calculate the Winning Player||
Complete the two functions below: calculate_score takes a list of ...
exception handling namedtuple numbers
|Bite 143. Look up a value in 3 dictionaries||
In this Bite you are presented with 3 dictionaries. Complete ...
|Bite 144. Calculate the Number of Months Passed||
Some more fun working with dates! In this Bite you ...
datetime dateutil exception handling
|Bite 145. Record Breakers||
The data for this challenge comes from a subset of ...
csv data analysis pandas
|Bite 146. Rhombus generator||
In this Bite you make a generator of rhombus shapes. ...
format f-strings string formatting
|Bite 147. 100 WEEKDays of Code Date Range||
Doing a #100DaysOfCode can be challenging, and some of it ...
|Bite 148. Print Car Data Grouped by Manufacturer||
In this Bite you are presented with a list of ...
data structures itertools operator sorting