I want that the content of a text file to be used as a input for my python script. This is my script. I want to replace few words:
import subprocess
import fileinput
import sys
import os
for line in text:
    line = line.replace("/dev/sda3              ", "")
    line = line.replace("/dev/sda6              ", "")
    line = line.replace("/dev/sda2              ", "")
    line = line.replace("/dev/sda1              ", "")
    line = line.replace("tmpfs                  ", "") 
Any suggestion is highly appreciated.
 
     
    