Re: clarification about subscript of python string
Alan Gauld via Tutor <[email protected]> Sun, 16 Mar 2025 14:42:09 +0000
| Newsgroups | gmane.comp.python.tutor |
|---|---|
| Message-ID | <[email protected]> |
On 14/03/2025 13:08, GGHSS POLUR bot via Tutor wrote: > Respected sir/mam > 1. Subscript of python string is positive and negative. > 2. Subscript of python string is positive or negative. > > in above statement which one right. please help me. The question is a bit vague. Both statements are correct depending on context. Python strings do have both positive and negative indexing. A single character can be indexed using either a positive or negative index or even both at the same time! -- Alan G Author of the Learn to Program web site http://www.alan-g.me.uk/ http://www.amazon.com/author/alan_gauld Follow my photo-blog on Flickr at: http://www.flickr.com/photos/alangauldphotos _______________________________________________ Tutor maillist - [email protected] To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor