Python Forum
logic comparater based on dictionary values
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
logic comparater based on dictionary values
#3
if __name__ == "__main__":
    a = {"10-01-2014":(10, 11.25), "10-02-2014":(11, 12.25), "10-03-2014":(12, 13.25)}
    if (v1 in a()) < 0:
        print('Value is negative!')
    else:
        print('Value is good')
Reply


Messages In This Thread
RE: logic comparater based on dictionary values - by ijosefson - Oct-16-2017, 04:50 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Replace based on values in a file WJSwan 2 1,638 Jan-30-2023, 04:38 PM
Last Post: deanhystad
  create empty sets for keys in a dictionary and add values to the set naughtysensei 1 2,627 Nov-03-2020, 08:32 AM
Last Post: DeaD_EyE
  Dictionary based exercise garvind25 2 2,080 Jul-12-2020, 06:53 PM
Last Post: garvind25
  Formatting data based on DataFrames values 577e94982d620b84f7c536d5e76f1e 0 2,140 Dec-03-2018, 02:23 AM
Last Post: 577e94982d620b84f7c536d5e76f1e
  Dictionary based assignment: Need help RoyceJ 6 4,070 Aug-29-2018, 05:30 AM
Last Post: perfringo

Forum Jump:

User Panel Messages

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