I have several large .rar files which contain a large amount of .zip files inside of the Rar archives. The archives contain a large volume of text files, for which I am trying to open each text file, scan the lines searching for particular strings. Not all of the .rar files contain .zip files and my current script works fine using rarfile and os.walk to iterate thru the members of the .rar archives when it only contains .txt files etc. Unfortunately, a lot of these .rar's contain .zip's that have the respective .txt files inside of those zips so I am trying to understand how to use rarfile.RarFile.open() to in turn open the contained .zip files and perform the same task using os.walk and zipfile with readlines etc. How do I 'feed' a zip file contained inside the rar to zipfile.ZipFile.open() in the same way I am doing with RarFile so that I can still find the search string inside the .txt files even when they are compressed into zip files inside the rar files?