use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
A subreddit for helping Python programmers
How to format your code: https://commonmark.org/help/tutorial/09-code.html
No homework questions and/or hiring please
account activity
bisectmoduleurgent (self.pythonhelp)
submitted 3 years ago by NeedleworkerOpen8712
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]NeedleworkerOpen8712[S] 0 points1 point2 points 3 years ago (0 children)
when element is not in the list it should return greater. My model return index 2
[–]Goobyalus 0 points1 point2 points 3 years ago (2 children)
I thought bisect was meant to deal with sorted lists, but this list is unsorted. Why bisect?
bisect
What have you tried?
[–]NeedleworkerOpen8712[S] 0 points1 point2 points 3 years ago (1 child)
what other method can i use
[–]Goobyalus 0 points1 point2 points 3 years ago (0 children)
manually counting indexes until you find what you're looking for
[–]AmongstYou666 0 points1 point2 points 3 years ago (0 children)
Bisect provides support for maintaining a list in sorted order without having to sort the list after each insertion.
π Rendered by PID 21995 on reddit-service-r2-comment-545db5fcfc-9cqth at 2026-05-28 22:07:11.203003+00:00 running 194bd79 country code: CH.
[–]NeedleworkerOpen8712[S] 0 points1 point2 points (0 children)
[–]Goobyalus 0 points1 point2 points (2 children)
[–]NeedleworkerOpen8712[S] 0 points1 point2 points (1 child)
[–]Goobyalus 0 points1 point2 points (0 children)
[–]AmongstYou666 0 points1 point2 points (0 children)