python
[Python] Function returns multiple values
def my_func():
return 1,2
x,y = my_func()
print(x)
print(y)
Output
1
2
2
Was this helpful?
Similar Posts
- Python program to return multiple values from a function
- [Python] Different ways to test multiple flags at once in Python
- Python - regex , replace multiple spaces with one space
- Multiple constructors in python
- Merge two or multiple dictionaries in Python
- Convert multiple spaces of a string to single space in python [with and without regex]
- Join two or multiple lists in Python