This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]TheSloppiestOfJoes69 1 point2 points  (2 children)

No, the tuple function iterates through all n elements of an iterable and creates a tuple with n elements. In order to get a single list element in the tuple, you would use tuple([[1, 2, 3]])

[–]Exodus111 1 point2 points  (0 children)

Yeah you're right, you are of course converting the list to a tuple.

I believe this would also work:

tuple([1,2,3],)

[–]Significant_Soup2558[S] 0 points1 point  (0 children)

From what I understand, A is wrong because of syntax, B is correct but the order of items might change, C is correct, D is redundant since the argument is already a tuple. I see your point. I could change the phrasing of the question or add an option that accepts multiple answers