I have this code:
import os
os.system('set x=5')
os.system('echo %x%')
When I do this, I expect to get 5 outputted to the screen, but instead I get %x%. I think this is because these two commands are being run on 2 different command prompt instances. If anyone can help, that would be greatly appreciated!
os.system('set x=5 && echo %x%')?