A Python 3 Idiom?
def powers(a):
return a, a*a, a*a*a
a, square, cube = powers(10)
print(a, square, cube)the last two lines could be refactored as:
print(*powers(10))This technique is ineffective in Python 2, where print is a statement and the syntax would be invalid.
