'e' is not being counted becuase it's outside of the [0:5] range, not because it is an odd number. It may be a bit confusing until you memorize how slicing works. If you slice an iterable variable with [begin:end], begin indexed item is included, while the end one is not. If you have [0:4], you can understand it as 4 items being selected, if that helps.
Beginner's String Operation question
Beginner's String Operation question
|
|
Messages In This Thread |
Beginner's String Operation question - by docboy - Sep-30-2018, 05:05 PM
RE: Beginner's String Operation question - by j.crater - Sep-30-2018, 05:16 PM
RE: Beginner's String Operation question - by docboy - Sep-30-2018, 05:20 PM
RE: Beginner's String Operation question - by docboy - Sep-30-2018, 05:45 PM
RE: Beginner's String Operation question - by j.crater - Sep-30-2018, 05:24 PM
RE: Beginner's String Operation question - by ichabod801 - Sep-30-2018, 05:32 PM
RE: Beginner's String Operation question - by j.crater - Sep-30-2018, 05:49 PM
|
Possibly Related Threads… | |||||
Thread | Author | Replies | Views | Last Post | |
Beginner Python Question: FIzz Buzz using while loop | camoyn13 | 2 | 1,872 |
Sep-20-2022, 09:00 AM Last Post: deanhystad |
|
NOT bit-wise operation question | ajayachander | 2 | 2,057 |
Jan-27-2020, 08:03 AM Last Post: ajayachander |
|
*Ultra beginner math question | Markg2 | 2 | 2,279 |
Apr-21-2019, 11:24 PM Last Post: Markg2 |
|
Beginner Python Homework Question (Calculate Gross Pay) | matchamochi7 | 4 | 5,749 |
Nov-02-2018, 01:06 PM Last Post: buran |
|
String to Floating Point Question | Babbare | 2 | 3,190 |
May-14-2017, 01:35 AM Last Post: Babbare |
Users browsing this thread: 1 Guest(s)