I have some code in python like:
something = r"grep some {0} stuff".format("somethingelse")
r = subprocess.check_output(
something, shell=True, cwd=os.path.join(directory, 'path'))
In essence, I want to know what the first assignment is doing with "r". If "r" has a value (assigned last), how is the first assignment able to use it successfully (r doesn't have a value yet)? What exact does the first line do when it uses "r"?
I know you guys will hate this question, but it's something that's very difficult to google for. Feel free to throw me a link to read and I'll be on my way.
Also, if I do:
test = r"wat"
in a completely separate script, the command will work. Then when you print "test", all it does it print "wat". What happens to the "r"?