#!/usr/bin/env python3 import os with open("home/me/pwds","r") as a: for lines in a: for words in lines.split(): os.system("unrar x -y -p{} /home/me/documents/target.rar".format(words))Last line your missing (words)
)
.Use subprocess instead
os.system()
security reasons and other problems.Quote:os.system() and os.popen*() have been deprecated since Python 2.6 in favor of the subprocess module.