Python Forum
Newbie have thoughts about logic
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Newbie have thoughts about logic
#18
How about this one
thislist = ["apple", "banana", "cherry", "orange", "kiwi", "melon", "mango"]
print(thislist[2:5])
My first objection - why does Python start counting with zero instead of one? Nobody starts counting with zero so it's unlogical to me.
My second objection - why is the count not include the fifth word but stops at the fourth? Yes that's the Python rule I know but I think it's unlogical, to me.
Reply


Messages In This Thread
Newbie have thoughts about logic - by sdd - Sep-01-2021, 10:20 PM
RE: Newbie have thoughts about logic - by Yoriz - Sep-01-2021, 10:33 PM
RE: Newbie have thoughts about logic - by perfringo - Sep-02-2021, 04:15 AM
RE: Newbie have thoughts about logic - by sdd - Sep-12-2021, 06:11 PM
RE: Newbie have thoughts about logic - by perfringo - Sep-13-2021, 06:15 AM
RE: Newbie have thoughts about logic - by sdd - Sep-13-2021, 08:09 PM
RE: Newbie have thoughts about logic - by Lou - Sep-02-2021, 04:16 AM
RE: Newbie have thoughts about logic - by sdd - Sep-12-2021, 06:01 PM
RE: Newbie have thoughts about logic - by Yoriz - Sep-12-2021, 06:14 PM
RE: Newbie have thoughts about logic - by SamHobbs - Sep-13-2021, 02:05 AM
RE: Newbie have thoughts about logic - by sdd - Sep-13-2021, 07:41 PM
RE: Newbie have thoughts about logic - by SamHobbs - Sep-13-2021, 09:00 PM
RE: Newbie have thoughts about logic - by SamHobbs - Sep-14-2021, 02:32 AM
RE: Newbie have thoughts about logic - by Larz60+ - Sep-14-2021, 02:51 AM
RE: Newbie have thoughts about logic - by sdd - Sep-15-2021, 01:07 AM
RE: Newbie have thoughts about logic - by bowlofred - Sep-15-2021, 03:11 AM
RE: Newbie have thoughts about logic - by SamHobbs - Sep-15-2021, 06:42 PM
RE: Newbie have thoughts about logic - by perfringo - Sep-15-2021, 03:35 AM
RE: Newbie have thoughts about logic - by sdd - Sep-15-2021, 11:11 AM
RE: Newbie have thoughts about logic - by perfringo - Sep-16-2021, 07:07 AM
RE: Newbie have thoughts about logic - by SamHobbs - Sep-15-2021, 01:27 AM
RE: Newbie have thoughts about logic - by Larz60+ - Sep-15-2021, 09:08 AM
RE: Newbie have thoughts about logic - by sdd - Sep-15-2021, 11:37 AM
RE: Newbie have thoughts about logic - by snippsat - Sep-15-2021, 12:29 PM
RE: Newbie have thoughts about logic - by SamHobbs - Sep-15-2021, 06:50 PM
RE: Newbie have thoughts about logic - by ndc85430 - Sep-16-2021, 06:09 PM
RE: Newbie have thoughts about logic - by SamHobbs - Sep-16-2021, 07:36 PM
RE: Newbie have thoughts about logic - by Serafim - Sep-17-2021, 10:13 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Thoughts on interfacing with a QR code reader that outputs keystrokes? wrybread 1 1,487 Oct-08-2021, 03:44 PM
Last Post: bowlofred
  How to timestamp a Python program, your thoughts? Orthoducks 2 4,671 Dec-02-2016, 12:06 AM
Last Post: Orthoducks

Forum Jump:

User Panel Messages

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