Karuvägistaja
Karuvägistaja

Reputation: 293

How to remove environment variables at the end of a loop?

My code runs in a while loop and at one point needs to use proxies like this:

os.environ["HTTPS_PROXY"] = "http://195.154.XXX.XXX:XXX01"
os.environ["HTTP_PROXY"] = "http://195.154.XXX.XXX:XXX01"

When the new loop starts, however, I need to remove these os.environ changes or else the program doesn't work.

How could I do that? And yes, I NEED to use os.environ to make the second part of the code work.

Upvotes: 0

Views: 1428

Answers (0)

Related Questions