Back to lesson Try it Yourself
Python List Methods and Slicing
Python
Result
Expected output
[0, 2, 4, 6, 8]
[1, 4, 7]
[9, 8, 7, 6, 5, 4, 3, 2, 1, 0]

Keyboard shortcuts

Ctrl + EnterRun the code
Ctrl + SSave in this browser
Ctrl + /Comment / uncomment line
Tab / Shift + TabIndent / outdent
Ctrl + Z / Ctrl + YUndo / redo
Ctrl + FFind (browser search)

Your code is saved automatically in this browser. Share copies a link that opens this exact code. Code runs in a safe sandbox – it can't see your account.

Are you sure?