logo CodeStepByStep logo


Language/Type: Python lists syntax

Given the following list, write slicing expressions that would produce the following results:

# index     0    1    2    3    4    5    6
letters = ["a", "b", "c", "d", "e", "f", "g"]
["a", "b"]
["d", "e", "f", "g"]
["g", "f", "e"]
["b", "d", "f"]

You must log in before you can solve this problem.

Log In

Need help?

Stuck on an exercise? Contact your TA or instructor.

If something seems wrong with our site, please

Is there a problem? Contact us.