Say I have a function that when you give it a number it returns a color and shape:
def metadata(number):
"""Define the state FIPS code and state name from a given state abbreviation.
:param number num -> number of object
:return: color: str -> color of object
:return: shape: str -> shape of object
"""
if_number == 1: color = 'red'; shape = 'square'
if number == 2: color = 'blue'; shape = 'triangle'
if number == 3: color = 'yellow'; shape = 'circle'
return color, shape
How do I get the function to take in more than one argument? So I could run metadata(1,2,3) and it would output all the colors and shapes? I tried researching solutions but it is not quite a python dictionary so I haven't been able to find something similar. If you know a name for this kind of structure that would be helpful in my search! Not sure if there is a name for this if key = value: key = value; key = value
function