Python Forum
Probelm in displaying char. indexwise
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Probelm in displaying char. indexwise
#6
(Feb-09-2017, 02:33 PM)ShailendraRaghunathPhadke Wrote:
(Feb-09-2017, 02:23 PM)buran Wrote: Slicing:
some_iterable[start:stop:step]
stop is not included, so [1:3] would start at 1 and up to, but not including 3

OK Buran I understand your explanation. Thanks for reply.

It can be easier to understand if you consider that the indices are really indices between the letters (or list elements)
 W e l c o m e
0 1 2 3 4 5 6 7
So, here, [1:3] brackets 'el'
Unless noted otherwise, code in my posts should be understood as "coding suggestions", and its use may require more neurones than the two necessary for Ctrl-C/Ctrl-V.
Your one-stop place for all your GIMP needs: gimp-forum.net
Reply


Messages In This Thread
RE: Probelm in displaying char. indexwise - by Ofnuts - Feb-09-2017, 09:00 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
Sad How to split a String from Text Input into 40 char chunks? lastyle 7 1,332 Aug-01-2023, 09:36 AM
Last Post: Pedroski55
  How to replace on char with another in a string? korenron 3 2,455 Dec-03-2020, 07:37 AM
Last Post: korenron
  How to remove char from string?? ridgerunnersjw 2 2,642 Sep-30-2020, 03:49 PM
Last Post: ridgerunnersjw
  Sum char word dictionary RavCOder 3 2,468 Nov-08-2019, 01:32 PM
Last Post: perfringo
  The use of escape char \ hishamzero1 2 2,450 Aug-12-2019, 10:20 PM
Last Post: hishamzero1
  First non-repeating char and some errors. blackknite 1 2,354 Jan-06-2019, 02:19 PM
Last Post: stullis
  Probelm using Boolean input phrase.isupper() skrivver99 4 3,216 Nov-04-2018, 09:21 AM
Last Post: Larz60+
  json.dumps save some unicode chars as code, not char buran 1 3,005 Aug-02-2018, 04:02 PM
Last Post: buran
  pyserial char by char io fcagney 4 6,447 May-15-2018, 10:45 PM
Last Post: DeaD_EyE
  how to give your data column names based on char position whyme 7 4,566 Oct-27-2017, 06:45 PM
Last Post: heiner55

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020