You can use the following list comprehension to create a list composed of even integers between 5 and 85 in reverse order in Python:
main.py62 chars2 lines
This list comprehension starts with 86, which is the first even number greater than 85, and counts down by two until it reaches 6, which is the last even number greater than 4. It then filters out any odd numbers, and returns the resulting list in reverse order.
You can print the resulting list to check if it's correct:
main.py186 chars3 lines
This will print a list of even numbers in reverse order between 5 and 85.
gistlibby LogSnag