def remove_links_and_usernames(texto): texto = re.sub('@\S+','',texto) texto = re.sub('http\S+','',texto) return texto