I'm working in a wordcloud and I was thinking in a way to open whatever file as an input chosen by the user. For example, an docx file like input and exctrat all text on it and do the wordcloud. Or use a csv file or txt file, something like that.
I've tried with some libraries like pandas, but por each type of document I spent some lines of code and 'if loops' to test the type of the file.
Maybe:
But I'm not very sure about that.