fork download
  1. d = { 'foo' : 'bar',
  2. 'ev123' : 'found it!',
  3. 'baz' : 'qux' }
  4.  
  5. result = next(v for k, v in d.iteritems() if k.startswith('ev'))
  6.  
  7. print result
Success #stdin #stdout 0.01s 6356KB
stdin
Standard input is empty
stdout
found it!