Ignore some members of a returned tuple in Julia
julia
Solution
I think you can do the same thing that is common in python, namely use underscores for skipped values. Example:
a, _ = mult_return()
It works multiple times as well
_, _ = mult_return()
Problem
Julia does not support multiple return, per se. However, Julia performs similar functionality by returning a tuple of values, which can then be assigned to a tuple of variables. For instance: ``` function mult_return() (3,2) end ``` returns the tuple `(3,2)`. We can then assign these two return values to different variables, as follows: `(a,b) = mult_return()` (or `a,b = mult_return()` because the parenthesis are not necessary.) My question is this: Is there a way to ignore one of the return values? For example, in Matlab syntax, a user could write: ``` [~, b] = mult_return() ``` so that only the second value is assigned to a variable. What is the proper way to approach this problem in Julia?