Tips, Tricks and Tools
... and Thoughts
(Move to ...)
Home
All Posts
Firefox Extensions
JavaScript Compiler and Encoder
Bulk Player for YouTube
Misc Tools
Support
▼
Friday, March 29, 2019
Python: return multiple values from a function
def op(number1, number2):
return number1 + number2, number1 - number2, number1 * number2, number1 / number2
add, sub, mul, div = op(10, 5)
print (add, sub, mul, div)
The result:
(15, 5, 50, 2)
No comments:
Post a Comment
‹
›
Home
View web version
No comments:
Post a Comment