Source Code:
(back to article)
class MultipleValues: def __init__(self, value1, value2): self.value1 = value1 self.value2 = value2 def multiple_values(): value1 = "apple" value2 = "orange" return MultipleValues(value1, value2) result = multiple_values() print(result.value1) # "apple" print(result.value2) # "orange"
Result:
Report an issue