Python list syntax help -


results=[key key, value in adictionary if str(key).startswith('target')      , value > 0 ] 

what trying here select keys if key in dictionary beginswith target , value greater 0. looks there's problem this, me~

results=[key key, value in adictionary.items() if str(key).startswith('target')               , value > 0 ] 

Comments

Popular posts from this blog

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

visual c++ - Using relative values in array sorting ( asm ) -