word="have a good day"

if i want to print only this word (good)

i will run this cod

print(word[6:11])

why i should write 6 ? and 11?

Recommended Answers

All 2 Replies

I too am confused by this. Shouldn't word[6:11] be " good", not "good"?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.