Skip to content
Advertisement

How to read .rtf file and convert into python3 strings and can be stored in python3 list?

I am having a .rtf file and I want to read the file and store strings into list using python3 by using any package but it should be compatible with both Windows and Linux.

I have tried striprtf but read_rtf is not working.

JavaScript

But in this code, the error is: cannot import name ‘read_rtf’

Please can anyone suggest any way to get strings from .rtf file in python3?

Advertisement

Answer

Have you tried this?

JavaScript

For a super large file, try this:

JavaScript
User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement