I am new to regular expression module. I am trying to remove all the links in a given exampleString but in one line of code:
exampleSentence = exampleSentence.replace(link for link in re.findall(r'http://*',exampleSentence),'')
But I am getting this syntax error:
SyntaxError: Generator expression must be parenthesized if not sole argument
How to proceed with this?
 
     
     
    