We use Python 3.6

go back Level: Advanced (img: AV / score: 4) level Bite 112. Social Media Username Validator

6 out of 7 users completed this Bite ...
Will you be Pythonista #7 to crack this Bite?
Average Bite difficulty 1-10 rating: 6.0
» Up for a challenge? 💪

In this Bite you parse social_platforms below into a dict of Validator namedtuples. For each social network you should extract a range and re.compile object.

With the data parsed complete validate_username that validates a username against a social network of choice (Twitter, Facebook, Reddit here).

The regex might make this a bit more advanced, but as it's an advanced Bite we hope you can draw from the docstrings and tests. Enjoy and keep learning more Python!

Github login button