I've got original text and its tokens: Example:
original_text = " Genius, scientist and my friend - John"
text_tokens = ["Genius", ",", "scientist", "and", "my", "friend", "-", "John"]
I'm changin' tokens: For example:
Genius -> <spam>Genius</spam>
I need to recover text including SPACES. How I can do that? Result should be like that:
" <spam>Genius</spam>, scientist and my friend - John"