Created
July 4, 2016 15:44
-
-
Save nikuzuki/3796b98ebb9b9126ba5e923e3516621f to your computer and use it in GitHub Desktop.
python3.5.1の多値返却
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def f(): | |
return("niku", "zuki") | |
a, b = f() | |
c = f()[1] | |
print (a, b, c) # niku zuki zuki |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
後ろに添字を付けることで、必要な返り値を指定できる