211k views
4 votes
Given that worst_offenders has been defined as a list with at least 6 elements, write a statement that defines lesser_offenders to be a new list that contains all the elements from index 5 of worst_offenders and beyond. Do not modify worst_offenders.

1 Answer

7 votes

Answer:

worst_offenders=[16,5,27,12,9,45,7,6,9,2,4,3,5,99,33];

lesser_offenders=worst_offenders[5:];

print lesser_offenders;

User MaxGDN
by
6.9k points