Question: IN PYTHON3: If y is a list, x = y simply adds an alias to the object rather than creating a new object. Write the
IN PYTHON3: If y is a list, x = y simply adds an alias to the object rather than creating a new object. Write the statement that makes a new object x, containing the values of y.
Can anyone confirm my answer below and explain why, or give the correct answer and say why that is the right answer? I'm just confused with the wording my professor gave us.
# y initialized as a list y = [1, 2, 3] # x is a new object, with y passed as an argument to list() x = list(y)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
