Python Forum
Get the correct value when comparing with the list
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Get the correct value when comparing with the list
#8
I don't understand.  In your original post, you said you wanted the first number that wasn't larger.  Now you want the first number that IS larger.  It should be simple to switch either of the code samples provided to do that (flip a < to a >), but that might just cause an issue with different input.  I think you need to more clearly define what it is, exactly, the output looks like for the various input.
Reply


Messages In This Thread
RE: Get the correct value when comparing with the list - by nilamo - Aug-07-2017, 09:10 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Comparing List values to get indexes Edward_ 7 1,387 Jun-09-2023, 04:57 PM
Last Post: deanhystad
  Select correct item from list for subprocess command pythonnewbie138 6 3,451 Jul-24-2020, 09:09 PM
Last Post: pythonnewbie138
  Problem with comparing list palladium 2 2,224 Jul-08-2020, 10:49 AM
Last Post: DeaD_EyE
  comparing 2 dimensional list glennford49 10 4,310 Mar-24-2020, 05:23 PM
Last Post: saikiran
  What is the correct syntax for list items that need to contain a quotation mark, etc? KaisoArt 7 3,672 Sep-14-2019, 05:26 AM
Last Post: buran
  Looping through dictionary and comparing values with elements of a separate list. Mr_Keystrokes 5 4,027 Jun-22-2018, 03:08 PM
Last Post: wavic
  Create a new list by comparing values in a list and string DBS 2 3,627 Jan-14-2017, 07:59 AM
Last Post: Yoriz

Forum Jump:

User Panel Messages

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