If you open a text file with
text.read () , a list is returned. Is it possible to somehow convert it from a string to work with it further with regular expressions?
Answer 1, authority 100%
myList = ['str1', 'str2', 'str3'] myString = '' .join (myList) # '' - separator between list items, respectively & gt; & gt; & gt; str1str2str3 myString = '_'. join (myList) & gt; & gt; & gt; str1_str2_str3