Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialMarcus Sassi
4,394 PointsCopy a list with slices
I am doing the quiz for slices and there is this question where they ask how to copy a list with slices.
they want you to copy a_list = [1, 2, 3]
I know how to make a copy, for instance:
a_list = [1, 2, 3]
my_list = a_list[:]
which copies the entire a_list. But I don't know what to type in to get it right.
2 Answers
Steven Parker
231,275 PointsThe blank in the question only represents the slice syntax. It might be confusing because the copy being made won't be saved anywhere (there's no assignment being made).
So just answer with the characters you would add to the list to make a copy.
Lee Preslan
Python Web Development Techdegree Student 1,273 PointsI agree with you Burton King . These code challenges are worded terribly and the videos suck!
Marcus Sassi
4,394 PointsMarcus Sassi
4,394 PointsSteven, thank you so much for the help.
Burton King
3,938 PointsBurton King
3,938 PointsThat's horrible -- some of these questions are awful to try and figure what they're asking for. Grade = F.