#Random Python Question #5

What is the result when you execute the below Python code:

month_list=[‘Jan’, ‘Feb’, ‘Mar’, ‘Apr’, ‘May’]
print(month_list[8:])

(1) IndexError

(2) []

(3) ‘Mar’

(4) ‘Aug’

What’s the correct result from the above 4 options?

Leave a comment

Design a site like this with WordPress.com
Get started