Negation in Python

The negation operator in Python is not. Therefore just replace your ! with not. For your example, do this: For your specific example (as Neil said in the comments), you don’t have to use the subprocess module, you can simply use os.mkdir() to get the result you need, with added exception handling goodness. Example:

Open File in Another Directory (Python)

If you know the full path to the file you can just do something similar to this. However if you question directly relates to relative paths, that I am unfamiliar with and would have to research and test. Edit: Here is a way to do it relatively instead of absolute. Not sure if this works … Read more

Converting integer to binary in python

Just to explain the parts of the formatting string: {} places a variable into a string 0 takes the variable at argument position 0 : adds formatting options for this variable (otherwise it would represent decimal 6) 08 formats the number to eight digits zero-padded on the left b converts the number to its binary … Read more