I'm trying to figure out if it's possible to assign two different returned values from a python function to two separate variables.
Here's the function, which returns a name and city value.
def authenticate():
name = raw_input("What is your name? ")
city = raw_input("What city do you live in? ")
if name != "Jerry Seinfeld" or city != "New York":
print """
Access denied
"""
else:
print """
Authenticated
"""
return name and city
Now, I want to assign the returned values to two variables, a and b.
I only know how to assign one value, like this.
a = authenticate()
(this actually assigns the city value to a, which I'm guessing is because "return name" comes before "return city" in the code)
Is what I'm trying to do possible?