Print(topic[0:10000])

topic = “1MFoundation of Data Science”

print(topic[0:10000])

o/p:

1MFoundation of Data Science

why?

No error here?

Yes,you can give any large number as last index.Python will not throw any error and returns complete string if given last index is greater than length of string

thk you for the reply, how python handling internally even though my string is initialized. Also why it is going beyond the boundaries.