Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Introduction
Quick recap
Indexing and slicing
12. Slicing without bounds
Summary

Instruction

Good job! When you use slicing, you can also skip over one or both of the bounding indices:

alphabet = 'abcdefghijklmnopqrstuvwyxz'
upperbound_skipped = alphabet[2:]
lowerbound_skipped = alphabet[:5]

In the query above, upperbound_skipped gets all string elements with indices from 2 (inclusive) until the end of the string—i.e., 'cdefghijklmnopqrstuvwyxz'.

In turn, lowerbound_skipped gets all characters from the beginning of the string until index 5 (exclusive). Essentially, we'll get the following: 'abcde'.

Exercise

Print each log in the logs list on a new line, and don't include the time part.

Stuck? Here's a hint!

Use log[6:] to get rid of the time for a given log.