I would like to open and work with a file with Python however I would like to use Windows %systemdrive% when referring to a file instead of full path.
This piece of code works:
if not os.path.isfile('C:\\Work\\test\sample.txt'):
This does not:
if not os.path.isfile('%systemdrive%\\Work\\test\\sample.txt'):
Any idea? Thank you in advance!