How to skip over a environment variable when iterating over them
Question:
this is my code:
import os
def main():
g = input("What's the password?n")
if g == os.environ['master-password']:
for name, value in os.environ.items():
if name == "master-password":
break #obviously just ends the program
else:
print("{0}: {1}".format(name, value))
main()
I want to skip the master password so it is not revealed.
The reason I want this is that I’m using replit
Answers:
this is my code:
import os
def main():
g = input("What's the password?n")
if g == os.environ['master-password']:
for name, value in os.environ.items():
if name == "master-password":
break #obviously just ends the program
else:
print("{0}: {1}".format(name, value))
main()
I want to skip the master password so it is not revealed.
The reason I want this is that I’m using replit