This community-built FAQ covers the “Reversed List” exercise from the lesson “Code Challenge: Loops”.
Paths and Courses
This exercise can be found in the following Codecademy content:
Computer Science
FAQs on the exercise Reversed List
Join the Discussion. Help a fellow learner on their journey.
Ask or answer a question about this exercise by clicking reply (
) below!
Agree with a comment or answer? Like (
) to up-vote the contribution!
Need broader help or resources? Head here.
Looking for motivation to keep learning? Join our wider discussions.
Learn more about how to use this guide.
Found a bug? Report it!
Have a question about your account or billing? Reach out to our customer support team!
None of the above? Find out where to ask other questions here!
catower
Split this topic
2
A post was split to a new topic: Code challenge bug [solved]
catower
Split this topic
3
catower
Split this topic
8
25 posts were merged into an existing topic: Return will end a function and stop any loops
catower
Split this topic
10
6 posts were merged into an existing topic: How can I iterate over a list backward?
catower
Split this topic
16
4 posts were split to a new topic: Could I just use reverse()
?
catower
Split this topic
23
2 posts were split to a new topic: My solution
catower
Split this topic
26
catower
Split this topic
29
catower
Split this topic
32
catower
Split this topic
35
A post was split to a new topic: This is my solution
mtf
44
And now for a spot of silliness…
>>> a = [3, 5, 7]
>>> b = [8, 5, 3]
>>> c = zip(a, b[::-1])
>>> d = map(lambda x: set(x), c)
>>> e = filter(lambda x: len(x) != 1, list(d))
>>> list(e)
[{8, 7}]
>>> a = [3, 5, 7]
>>> b = [7, 5, 3]
>>> c = zip(a, b[::-1])
>>> d = map(lambda x: set(x), c)
>>> e = filter(lambda x: len(x) != 1, list(d))
>>> list(e)
[]
>>>
1 Like
catower
Split this topic
48
3 posts were merged into an existing topic: Sharing solutions
catower
Split this topic
51
5 posts were merged into an existing topic: What does lst2[len(lst2) - 1 - index]
do?
catower
Split this topic
56
catower
Split this topic
66
3 posts were merged into an existing topic: Sharing solutions
catower
Split this topic
69
2 posts were split to a new topic: Why doesn’t this code work?
catower
Split this topic
71
4 posts were split to a new topic: Is this code okay?
catower
Split this topic
75
3 posts were merged into an existing topic: How can I iterate over a list backward?
catower
Split this topic
80
2 posts were merged into an existing topic: Sharing solutions