Obtén el subreddit

Published by Helen Yu in

Crea una función para extraer el nombre del subreddit de su URL.

Ejemplos

sub_reddit("https://www.reddit.com/r/funny/") ➞ "funny"

sub_reddit("https://www.reddit.com/r/relationships/") ➞ "relationships"

sub_reddit("https://www.reddit.com/r/mildlyinteresting/") ➞ "mildlyinteresting"

Notas

N/A