Create a folder if not exist in Python

Create a folder if not exist in Python

Snippet:

import os

if not os.path.exists('/path/to/folder'):
        os.makedirs('/path/to/folder')