Oct-16-2017, 04:50 AM
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')
logic comparater based on dictionary values
|
|
Messages In This Thread |
logic comparater based on dictionary values - by ijosefson - Oct-16-2017, 03:56 AM
RE: logic comparater based on dictionary values - by Larz60+ - Oct-16-2017, 04:14 AM
RE: logic comparater based on dictionary values - by ijosefson - Oct-16-2017, 04:50 AM
RE: logic comparater based on dictionary values - by Mekire - Oct-16-2017, 06:04 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 |