Q. What is the output of ‘Python'[1:4]?

A
Pyt
B
ytho
C
thon
D
Error
Solution:

[1:4] slices from index 1 to 3 (exclusive), returning ‘ytho’.

Entri Contact Image

Get Expert Advice for Free: Register for Your Free Consultation Now!