python return multiple value1 Python return multiple values The canonical way to return multiple values in languages that support it is often tupling.Option: Using a tupleConsider this trivial example:def f(x): y0 = x + 1 y1 = x * 3 y2 = y0 ** y3 return (y0,y1,y2)However, this quickly gets problematic as the number of values returned increases. What if you want to return four or five values? Sure, you could keep tupling them, but it gets easy to forget w.. 2016. 12. 1. 이전 1 다음