I have a sentence like this
s = " zero/NN divided/VBD by/IN anything/NN is zero/NN"
I need to replace all the words with tags to just tags . Output should be
s = "NN VBD IN NN is NN"
I tried using regex replace like this
tup = re.sub( r"\s*/$" , "", s)
but this is not giving me the correct output . Please help