What is the problem, if any, with the following code?The desired output is [3,19].

>>> aList = [19,3]
>>> aList[O] = aList[1]
>>> aList[1] = aList[O]
>>>aList

•There is no problem.

•You need a temporary variable to hold the value 3.

•You need parentheses around 0 and 1, as in
aList(0) and aList(1).

•You need to import list to use a list.

Respuesta :

Answer: You need a temporary variable to hold the value 3

Explanation:

So, aList[0] is 3 and aList[1] is 19, if it will be as it is you litteraly say to the compiler to change aList[0] to aList[1]  at this moment aList[0] is 19 and aList[1] also is 19 and if you try to change aList[1] to aList[0]  it will not change its value because they are the same.

You need temp variable to keep one of the values.