Spaces:
Runtime error
Runtime error
File size: 332 Bytes
691ae91 |
1 2 3 4 5 6 7 8 9 10 |
def files_list_to_texts(files_list, glob="**/[!.]*"):
texts = []
for i in files_list:
if i.name.split('.')[-1] in ['txt']:
with open(i.name, encoding='utf-8') as f:
text = f.readlines()
text = [i for i in text]
texts.append(''.join(text))
return texts |