I want to pass two variables to the os.system() for example listing files in different format in specific directory like (ls -l testdirectory) in which both a switch and test directory are variable. I know for single variable this one works:
option=l
os.sytem('ls -%s' option)
but I dont know how to pass two variables?
This, for example, works:
you are asking about string formating (since
os.system
takes a string, not a list of arguments)or
or