Tuple Unpacking
I have a function called unpack_and_reverse that will accept one parameter, a tuple with at least three items. The function should return a new tuple with only the first three items, but listed in reverse order. #For example: # # a_tuple = ("a", "b", "c", "d", "e") # unpack_and_reverse(a_tuple) -> ("c", "b", "a") # #However, to do this, you should not access any value in #the tuple directly (e.g. with a_tuple[1]). Instead, you #should use tuple unpacking to unpack them into variables. #You also should not touch any items past the third item #in the tuple: use tuple slicing instead to only access #the first three. #Write your function here! def unpack_and_reverse(aTuple): (string1, string2, string3) = aTuple return(string3, string2, string1) # But I am getting this error below# CAn anyone advise. Traceback (most recent call last): File "PackRat.py", line 35, in <module> print(unpack_and_reverse(("a", "b", "c", "d", "e"))) File "PackRat.py", line 22, in unpack_and_reverse (string1, string2, string3) = aTuple ValueError: too many values to unpack (expected 3) Command exited with non-zero status 1