import os, sys name='a' img_path=os.path.join('data\\graphics', name+'.txt') print(img_path)