I have fetched some data from Twitter using python. now I want to pre process it. how can I remove usernames if the tweet has username between two words and there is no space am
import re Tweet = "Hello@username" Tweet = re.sub('@[^\s]+','',Tweet)
This code will remove the @username and Hello will not be removed.