← Back to challenges

YouTube Upload Count

PythonHarddata_structuresloopsstrings

Instructions

You are given a list of dates in the format Dec 11 and a month in the format Dec as arguments. Each date represents a video that was uploaded on that day. Return the number of uploads for a given month.

Examples

upload_count(["Sept 22", "Sept 21", "Oct 15"], "Sept") ➞ 2

upload_count(["Sept 22", "Sept 21", "Oct 15"], "Oct") ➞ 1

Notes

If you only pay attention to the month and ignore the day, the challenge will become easier.

python3
Loading editor…
⌘ ↵ to run
Walks through the solution with reasoning and edge cases.