I have an init function that holds some start up information. I would like to
- have the user input their email address,
- save it to a variable called "user_id"
- then use that variable within the init function.
It seems to be working using global variables, but I've read that using global variables is a bad idea.
How do I achieve this without using global variables?
user_id ="no email yet"
Class GetDatabase():
def user_email_input():
global user_id
user_id = input("what is your email")
return
def __init__(self,uri: Text = "localhost:2555", servername: Text = "schools") -> Text:
global user_id
self.uri = uri
self.servername= servername
self.me = user_id```