# FAQ: List Comprehension - Greater Than

This community-built FAQ covers the “Greater Than” exercise from the lesson “List Comprehension”.

Paths and Courses
This exercise can be found in the following Codecademy content:

## FAQs on the exercise Greater Than

There are currently no frequently asked questions associated with this exercise – that’s where you come in! You can contribute to this section by offering your own questions, answers, or clarifications on this exercise. Ask or answer a question by clicking reply () below.

If you’ve had an “aha” moment about the concepts, formatting, syntax, or anything else with this exercise, consider sharing those insights! Teaching others and answering their questions is one of the best ways to learn and stay sharp.

## Join the Discussion. Help a fellow learner on their journey.

Agree with a comment or answer? Like () to up-vote the contribution!

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!

Hi everyone,
this is my initial solution to this exercise:
nested_lists = [[4, 8], [16, 15], [23, 42]]
greater_than = [[firstItem,secondItem] + [firstItem > secondItem] for [firstItem,secondItem] in nested_lists]

print(greater_than)

When I try to run it, this is the result I am getting: [[4, 8, False], [16, 15, True], [23, 42, False]] - which I thought was what I was supposed to receive in return, since each sublist does contain a True or False on whether the first item is bigger than the second or not.

However, it looks like it’s not enough, because it doesn’t get you to the next stage of the course, the next message I see is: check to see if first Item > second Item in each sub-list. I thought I had achieved that with my solution.

Does anyone know what they mean with this message?

Would appreciate any hint.
Thanks,
Valentina

1 Like

This is the correct solution: greater_than = [firstItem > secondItem for [firstItem,secondItem] in nested_lists].

Hi,

I am also confused about this. I don’t understand the syntax here – how are we indicating in python that we are looking at the items within the list, instead of the items in the other sub lists?