Bite 209. Write a Sphinx docstring
|
|
Your team uses Sphinx and wants you to comply with …
3.10
data types
docstring
sphinx
|
|
Intro Bite 01. F-strings and a simple if/else
|
|
Welcome to our Intro Bites, it's time to gauge where …
3.10
freebie
f-strings
if/else
|
|
Bite 146. Rhombus generator
|
|
In this Bite you make a generator of rhombus shapes. …
3.10
format
f-strings
string formatting
|
|
Bite 167. Complete a User class: properties and representation dunder methods
|
|
In this Bite you are presented with another class, User …
3.10
classes
dunder methods
f-strings
properties
__repr__
__str__
string manipulation
|
|
Bite 173. Set up future notifications
|
|
Let's do another datetime processing Bite. Complete add_todo below that …
3.10
datetime
findall
f-strings
timedelta
|
|
Bite 187. Actor/actress age at movie release
|
|
Ever wondered how old an actor/actress was in a particular …
3.10
dataclasses
dateutil
f-strings
|
|
Bite 314. Print names to columns
|
|
In this Bite you will use the modulo operation. You …
3.10
f-strings
modulo
print
|
|
Bite 263. Count the number of islands in a grid
|
|
You are tasked with counting the amount of islands in …
3.10
algorithms
looping
string
|
|
Bite 309. A simple document class
|
|
When we want to transform our data often, method chaining …
3.10
annotations
classes
method chaining
properties
string
|
|
Bite 372. Validate Pangram
|
|
A pangram, according to the Oxford English Dictionary, is a …
algorithms
hashing
string
strings
|
|
Bite 15. Enumerate 2 sequences
|
|
Iterate over the given names and countries lists, printing them …
3.10
enumerate
string formatting
|
|
Bite 86. Create a RGB-to-Hex converter
|
|
Designer Mary wants to convert her CSS from statements like …
3.10
string formatting
|
|
Bite 119. Xmas tree generator
|
|
In this Bite you complete generate_xmas_tree that takes a rows …
3.10
default args
join
range
string formatting
|
|
Bite 162. Vertically align output of counters
|
|
In this Bite you are tasked with "physically" aligning the …
3.10
string formatting
|
|
Bite 164. CLI tool: HTML link converter (stdin to stdout)
|
|
In this Bite you are going to help your team …
3.10
data wrangling
exception handling
html
stdin
string formatting
string manipulation
sys
|
|
Bite 174. String manipulation and metrics
|
|
This bite will get you to play around with creating …
3.10
Counter
dataclasses
list comprehensions
properties
string formatting
string manipulation
translate
|
|
Bite 228. Create a Gravatar URL
|
|
In this Bite you will generate a Gravatar URL, e.g. …
3.10
gravatar
hashlib
string formatting
|
|
Bite 245. Xmas Tree 2.0
|
|
In this Bite you have to complete generate_improved_xmas_tree that takes …
3.10
range
string formatting
|
|
Bite 266. Composition, Inheritance, Abstract Base Class, what?
|
|
It’s not as bad as that sounds, really. If you …
3.10
ABCs
abstractmethod
beautifulsoup
composition
dataclasses
inheritance
namedtuple
string formatting
typing
urllib
web scraping
|
|
Bite 300. 🥳 PTO Calculator
|
|
We've all been affected by COVID-19 in one way or …
3.10
calendar
datetime
exception handling
looping
numbers
string formatting
|
|
Newbie Bite 49. Formatting Intro
|
|
In this Bite, you'll learn about string interpolation using the …
3.10
.format()
newbie
string interpolation
strings
|
|
Bite 217. Capture stdout
|
|
Sometimes you need to capture stdout in your script. Python …
3.10
context managers
StringIO
|
|
Bite 53. Convert text into multiple columns
|
|
You run a news site and you got feedback that …
3.10
string manipulation
|
|
Bite 68. Remove punctuation characters from a string
|
|
Complete remove_punctuation which receives an input string and strips out …
3.10
string manipulation
string module
|
|
Bite 224. Get sentences from a text
|
|
Here is another fun regex exercise for you: it's easy …
3.10
data wrangling
regular expressions
string manipulation
|
|
Bite 182. Parse a bunch of quotes from HTML
|
|
Let's get some inspiration. Below you find the simplified HTML …
3.10
dict
regular expressions
string manipulation
string parsing
|
|
Bite 225. Swap case PyBites characters
|
|
In this Bite you will swap case all pybites characters …
3.10
looping
string manipulation
string parsing
|
|
Bite 112. Social Media Username Validator
|
|
In this Bite you parse social_platforms below into a dict …
3.10
namedtuple
range
re
regular expressions
string manipulation
string matching
typing
|
|
Bite 127. Return the right ordinal suffix for a number
|
|
In this Bite you complete a function that takes an …
3.10
dict
modulo
numbers
string manipulation
|
|
Bite 131. Screen scraper
|
|
This is the output from using screenFetch on my junky …
3.10
dict
index
regular expressions
slicing
string manipulation
|
|
Bite 259. Reverse complement
|
|
In the majority of organisms, the genetic code is encoded …
3.10
bioinformatics
string manipulation
translate
|
|
Bite 139. Calculate a coding streak in days
|
|
In this Bite you are going to calculate the amount …
3.10
datetime
string manipulation
timedelta
|
|
Bite 234. Capitalize sentences
|
|
In this Bite you are going to capitalize sentences in …
3.10
regular expressions
string manipulation
string matching
string parsing
|
|
Bite 165. Parse an /etc/passwd file output
|
|
The /etc/passwd file is a text-based database of information about …
3.10
split
string manipulation
tuple unpacking
|
|
Bite 155. Split a string by spaces or quoted text
|
|
Another text manipulation Bite. Code split_words_and_quoted_text that takes a text …
3.10
split
string manipulation
|
|
Bite 276. Get Father's days by date and country
|
|
Happy belated Father's day (unless you are in Australia or …
3.10
dateutil
string manipulation
string parsing
|
|
Bite 191. Starwars character with highest BMI
|
|
In this Bite you will parse a multiline string of …
3.10
max
operator
string manipulation
tuple unpacking
|
|
Bite 250. PyBites URL Shortener
|
|
URL shortening is a technique on the World Wide Web …
3.10
decode
dict
encode
string manipulation
string module
type hinting
|
|
Bite 291. Find the fastest speech
|
|
In this Bite you will parse an SRT (SubRip Subtitle …
3.10
datetime
sorting
string manipulation
|
|
Bite 286. Decompress
|
|
Write a function, called decompress(), that accepts a string and …
3.10
recursion
string manipulation
|
|
Bite 302. Get and write all code from a JSON file
|
|
You are given a sample JSON file containing, among other …
3.10
filecmp
file processing
json
string manipulation
|
|
Bite 152. Manipulate string decorator
|
|
Write a decorator called strip_range that replaces characters with dots. …
3.10
decorators
kwargs
list
string manipulation
|
|
Bite 129. Analyze Stock Data
|
|
In this Bite we will answer some questions about stocks, …
3.10
counting
data analysis
json
requests
sorting
string manipulation
|
|
Bite 329. Convert dict keys to snake case
|
|
In this Bite we will take a (nested) dict and …
3.10
algorithms
recursion
string manipulation
|
|
Bite 223. Unix file permissions
|
|
Each file and directory in Unix has its permissions broken …
3.10
dict
list comprehensions
string manipulation
|
|
Newbie Bite 08. String Manipulation
|
|
There are times you'll need to manipulate the strings you've …
3.10
newbie
string manipulation
|
|
Intro Bite 06. Strip out vowels and count the number of replacements
|
|
In this Bite we'd like you to loop over the …
3.10
counting
freebie
regular expressions
replace
string manipulation
Zen of Python
|
|
Intro Bite 09. Workout dictionary lookups
|
|
In this Bite you learn how to lookup values from …
3.10
dict
exception handling
format
freebie
string manipulation
ternary
|
|
Bite 54. Nicer formatting of a poem or text
|
|
In this Bite you complete print_hanging_indents to print a poem …
3.10
string manipulation
textwrap
|
|
Bite 133. Convert an Amazon URL into an affiliation link
|
|
Can you help PyBites automate their Amazon affiliation link creation? …
3.10
regular expressions
string manipulation
|
|
Bite 149. Sorting words with constraint
|
|
Here is a list of words Jacob is trying to …
3.10
lambda
sorting
string manipulation
|
|
Bite 150. Turn messy CSV into JSON
|
|
At the 1 year mark of our platform here is …
3.10
csv
json
pandas
re
string manipulation
|
|
Bite 163. Which packages were upgraded?
|
|
In this Bite you compare a list of packages (aka …
3.10
comparison
dict
numbers
string manipulation
|
|
Newbie Bite 48. String Module
|
|
In this exercise, you'll practice writing another list comprehension (a …
3.10
list comprehensions
newbie
string manipulation
string module
|
|
Newbie Bite 41. String Manipulations
|
|
In this Bite, you'll learn more about manipulating strings in …
3.10
lists
lowercase
newbie
slicing
split
string manipulation
strings
strip
|
|
Bite 91. Matching multiple strings
|
|
Catching up after #PyCon2018 ... in this Bite you do …
3.10
all
any
string matching
|
|
Bite 115. Count leading spaces
|
|
A small but interesting Bite: given a string with leading …
3.10
counting
string matching
|
|
Bite 121. Determine the strength of a password
|
|
In this Bite you evaluate the strength of a password. …
3.10
re
string matching
|
|
Bite 122. Check if two words are anagrams
|
|
An anagram is a word or phrase formed by rearranging …
3.10
anagram
string matching
|
|
Bite 132. Find the word with the most vowels
|
|
Finish the get_word_max_vowels function below that takes a text string …
3.10
counting
lambda
list comprehensions
string matching
|
|
Bite 156. Make an index of story characters
|
|
You know the index at the end of a book …
3.10
collections
defaultdict
enumerate
sorting
string matching
|
|
Bite 157. Filter out accented characters
|
|
Another unicode Bite. Given some non-English text with accents (á, …
3.10
string matching
unicode
|
|
Bite 166. Complete a tox ini file parser class
|
|
The INI file format is an informal standard for configuration …
3.10
classes
configparser
properties
string matching
string parsing
tox
|
|
Bite 185. Create a simple spelling suggester
|
|
In this Bite you will write a simple spelling corrector. …
3.10
difflib
SequenceMatcher
string matching
|
|
Bite 193. Most upvoted StackOverflow Python questions
|
|
In this Bite you parse a copy of StackOverflow Python …
3.10
beautifulsoup
requests
sorting
string matching
web scraping
|
|
Bite 220. Analysing @pythonbytes RSS feed
|
|
Another feedparser exercise! In this Bite we're going to analyze …
3.10
classes
Counter
feedparser
max
min
namedtuple
regular expressions
string matching
type hinting
|
|
Bite 244. Make mutpy's output more digestible
|
|
Another real world scenario. When we started using MutPy for …
3.10
data wrangling
looping
mutpy
string matching
string parsing
|
|
Bite 272. Find common words
|
|
Given two sentences that each contains words in case insensitive …
3.10
algorithms
set operations
string matching
|
|
Bite 304. Most identical letters in a word
|
|
In this Bite, you will write a function called max_letter_word() …
3.10
casefold
Counter
max
string matching
|
|
Bite 61. Create a variable size Paw Patrol card deck with random actions
|
|
The Paw Patrol card deck consists of 32 cards ranging …
3.10
itertools
namedtuple
random
string module
|
|
Bite 47. Write a new password field validator
|
|
You know these Create a new password forms? They do …
3.10
re
string module
|
|
Bite 44. License key generator
|
|
Write a function called gen_key that creates a license key …
3.10
list comprehensions
secrets
string module
|
|
Bite 29. Martin's IQ test
|
|
Martin is preparing to pass an IQ test. The most …
3.10
enumerate
string module
|
|
Bite 99. Write an infinite sequence generator
|
|
Write a generator that produces the sequence [1, 'A', 2, …
3.10
generators
itertools
string module
zip
|
|
Intro Bite 05. Slice and dice
|
|
Take the block of text provided and strip off the …
3.10
freebie
replace
slicing
split
string module
strip
|
|
Bite 114. Implement a Color class with staticmethod
|
|
As the new junior developer, you have been charged with …
3.10
hex
__repr__
staticmethod
__str__
string module
|
|
Bite 251. Introducing Pandas Series
|
|
Let's get started with Pandas! In case you are not …
3.10
pandas
series
string module
|
|
Bite 178. Parse PyBites blog git commit log
|
|
In this Bite we want to figure out how active …
3.10
Counter
data analysis
datetime
dateutil
string parsing
|
|
Bite 179. Strip comments from Python code
|
|
In this Bite you will strip off all comments from …
3.10
comments
regular expressions
string parsing
|
|
Bite 198. Calculate my Mac's longest uptime
|
|
Given the following output, calculate the longest uptime / time …
3.10
data wrangling
datetime
dateutil
string parsing
|
|
Bite 226. Get top titles from news.python.sc
|
|
There is a new Python news aggregator in town! Check …
3.10
beautifulsoup
namedtuple
news
requests
sorting
string parsing
web scraping
|
|
Bite 232. Analyze gold prices
|
|
In this Bite you will analyze how the price of …
3.10
comparison
data analysis
looping
pandas
sorting
string parsing
|
|
Bite 235. Which Bite has the fastest tests?
|
|
In this Bite you will parse a pytest output summary, …
3.10
sorting
string parsing
type casting
|
|
Bite 257. Extract users dict from a multiline string
|
|
A quick Bite to practice some string parsing extracting a …
3.10
dict
string parsing
|
|
Bite 275. Get the most common email domains
|
|
In this Bite you will process a list of emails …
3.10
Counter
requests
set
string parsing
web scraping
|
|
Bite 285. Nested List Extraction
|
|
Sometimes dealing with data can be a real struggle. Sometimes …
3.10
data structures
string parsing
|
|
Bite 290. Class Rosters Data Conversion
|
|
You have been given a comma-delimited .csv file containing class …
3.10
csv
string parsing
tuple unpacking
|
|
Bite 305. Split once, delimit many
|
|
Write a function that accepts a string and splits the …
3.10
looping
split
string parsing
|
|
Bite 321. Magic bytes
|
|
Magic numbers are bytes that can be used to uniquely …
3.10
bytes
csv
exception handling
file processing
images
string parsing
|
|
Bite 373. Reverse only Letters
|
|
Given a string, reverse only the English letters (lowercase or …
queues
stacks
strings
|
|
Bite 374. Group Anagrams
|
|
As defined by the OED, an anagram is a word, …
array
defaultdict
strings
|
|
Bite 375. Find All Letter Combinations of a Phone Number
|
|
The typical phone keypad (pictured) features numbers (0 - 9), …
backtracking
itertools
strings
|
|
Newbie Bite 30. Special Chars
|
|
In this Bite, you'll learn about special characters in Python …
3.10
newbie
newline
special characters
strings
tab
|
|
Newbie Bite 31. Word Count
|
|
In this bite, we are going to explore two useful …
3.10
methods
newbie
strings
|
|
Bite 2. Regex Fun
|
|
Learn some Python regular expressions by completing the following three …
3.10
findall
freebie
re
regular expressions
|
|
Bite 8. Rotate string characters
|
|
Write a function that rotates characters in a string in …
3.10
deque
slicing
|
|
Bite 21. Query a nested data structure
|
|
Given the provided cars dictionary: Get all Jeeps Get the …
3.10
data structures
dictionary comprehensions
list comprehensions
sorting
|
|
Bite 27. Parse omdb movie json data
|
|
Working with APIs is very common these days and lucky …
3.10
APIs
glob
json
movie data
|
|
Bite 28. Converting date strings to datetimes
|
|
In this Bite you are provided with a list of …
3.10
Counter
datetime
findall
|
|
Bite 42. Number Guessing Game Class
|
|
In this Bite you implement a Game class to perform …
3.10
classes
games
random
|
|
Bite 75. Parse Unix cal to a weekday mapping
|
|
In the last bite we return the weekday from a …
3.10
re
Unix
zip
|
|
Bite 95. Subclass the dict built-in
|
|
In this Bite you will subclass the dict built-in to …
3.10
classes
inheritance
|
|
Bite 96. Build Unix' wc program in Python
|
|
In this Bite you will convert Unix' wc command into …
3.10
file processing
tempfile
Unix
|
|
Intro Bite 02. Infinite loop, input, continue and break
|
|
In this Bite we'll get you to take user input …
3.10
break
continue
freebie
input
mock.patch
while
|
|
Bite 128. Work with datetime's strptime and strftime
|
|
In this Bite you get some more practice with datetime's …
3.10
datetime
strftime
strptime
|
|
Bite 138. OOP fun at the Zoo
|
|
Finish the Animal class below adding one or more class …
3.10
classes
classmethod
itertools
__str__
|
|
Bite 141. Primitive date format inferrer
|
|
Complete the get_dates method given the following: a listing of …
3.10
classmethod
datetime
enum
exception handling
|
|
Bite 159. Create a simple calculator
|
|
In this Bite you will create a simple calculator. It …
3.10
exception handling
numbers
operator
|
|
Bite 169. Simple length converter
|
|
Your task is to complete the convert() function. It's purpose …
3.10
exception handling
numbers
rounding
|
|
Bite 199. Multiple inheritance (__mro__)
|
|
Implement the following class structure: print(Child.__mro__): (<class '__main__.Child'>, <class '__main__.Father'>, …
3.10
classes
inheritance
__mro__
multiple inheritance
|
|
Bite 202. Analyze some Bite stats data - part II
|
|
In this Bite you will analyze complexity levels of our …
3.10
csv
data analysis
sorting
|
|
Bite 256. Scrape PyCon events
|
|
In this Bite, we want you to scrape PyCon 2019 …
3.10
beautifulsoup
data analysis
json
namedtuple
pycon
requests
web scraping
|
|
Bite 271. Get all class names from a module
|
|
In this Bite you will write a function to get …
3.10
inspect
list comprehensions
|
|
Bite 294. Bowling score
|
|
If you've never tried bowling, it's a fun game to …
3.10
games
looping
numbers
|
|
Bite 301. Exchange rates
|
|
In this Bite you have to provide the currency exchange …
3.10
datetime
dict
sorting
|
|
Bite 307. SQLite3 introduction
|
|
In this Bite, you are going to get some practice …
3.10
databases
SQL
sqlite3
|
|
Bite 315. More logging practice
|
|
In this Bite you will hone your logging skills by …
3.10
exception handling
logging
|
|
Bite 324. Pretty string
|
|
Write a function that returns a neatly formatted string representation …
3.10
pprint
|
|
Bite 325. Floating point arithmetic
|
|
This Bite introduces you to a few issues associated with …
3.10
arithmetic
floats
numbers
rounding
|
|
Bite 326. Abstract Syntax Tree (AST) Printer
|
|
In this Bite we familiarise with Abstract Syntax Trees (ASTs). …
3.10
AST
|
|
Bite 352. Hash SQL statements
|
|
In this Bite you are going to implement a simple …
3.10
hashlib
SQL
|
|
Bite 366. Goal Tracker
|
|
In this Bite, you build a function that tells you …
3.10
date
datetime
tuple unpacking
|
|
Bite 367. Add Pi Day to the calendar
|
|
Python has a brilliant but often overlooked module called calendar. …
3.10
calendar
tuple unpacking
|
|
Bite 379. Hedge Maze
|
|
Imagine you're trapped in a mysterious maze, much like the …
breadth-first
graph traversal
maze
|
|