Python Create File if Not Exist

June 13, 2019
import os

FILE = 'data/config.yaml'

if not os.path.exists(FILE):
    with open(FILE, 'w'): pass
This work is licensed under a
Creative Commons Attribution-NonCommercial 4.0 International License.