Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Find _ in a list
#16
Change it from bisect_left to bisect_right. Now it will give you an insertion point to the right of your target. If you back up one spot (like the program does), that will return the largest number less than or equal to your target.
Reply


Messages In This Thread
Find _ in a list - by 1234 - Nov-30-2020, 04:31 PM
RE: Find _ in a list - by deanhystad - Nov-30-2020, 04:44 PM
RE: Find _ in a list - by 1234 - Nov-30-2020, 07:21 PM
RE: Find _ in a list - by deanhystad - Nov-30-2020, 08:16 PM
RE: Find _ in a list - by bowlofred - Nov-30-2020, 08:36 PM
RE: Find _ in a list - by 1234 - Dec-01-2020, 03:19 PM
RE: Find _ in a list - by bowlofred - Dec-01-2020, 04:51 PM
RE: Find _ in a list - by 1234 - Dec-01-2020, 05:45 PM
RE: Find _ in a list - by bowlofred - Dec-01-2020, 05:56 PM
RE: Find _ in a list - by 1234 - Dec-01-2020, 06:33 PM
RE: Find _ in a list - by deanhystad - Dec-01-2020, 05:48 PM
RE: Find _ in a list - by 1234 - Dec-01-2020, 06:35 PM
RE: Find _ in a list - by bowlofred - Dec-01-2020, 07:13 PM
RE: Find _ in a list - by deanhystad - Dec-01-2020, 07:05 PM
RE: Find _ in a list - by 1234 - Dec-01-2020, 07:20 PM
RE: Find _ in a list - by bowlofred - Dec-01-2020, 07:53 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Program to find Mode of a list PythonBoy 6 997 Sep-12-2023, 09:31 AM
Last Post: PythonBoy
  find random numbers that are = to the first 2 number of a list. Frankduc 23 3,013 Apr-05-2023, 07:36 PM
Last Post: Frankduc
  Find (each) element from a list in a file tester_V 3 1,155 Nov-15-2022, 08:40 PM
Last Post: tester_V
  read a text file, find all integers, append to list oldtrafford 12 3,371 Aug-11-2022, 08:23 AM
Last Post: Pedroski55
  find some word in text list file and a bit change to them RolanRoll 3 1,482 Jun-27-2022, 01:36 AM
Last Post: RolanRoll
  How to find the second lowest element in the list? Anonymous 3 1,905 May-31-2022, 01:58 PM
Last Post: Larz60+
  Python Program to Find the Total Sum of a Nested List vlearner 8 4,786 Jan-23-2022, 07:20 PM
Last Post: menator01
  Find the highest value of a list Menthix 4 1,834 Oct-29-2021, 02:32 PM
Last Post: Menthix
  Find Common Elements in 2 list quest 4 2,685 Apr-14-2021, 03:57 PM
Last Post: quest
  List of error codes to find (and count) in all files in a directory tester_V 8 3,583 Dec-11-2020, 07:07 PM
Last Post: tester_V

Forum Jump:

User Panel Messages

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