fork(2) download
  1. def maxodd(iterable):
  2. odd = (n for n in iterable if n%2)
  3. max_ = next(odd, None)
  4. if max_ is not None:
  5. return reduce(lambda n,m: n if n > m else m, odd, max_)
  6.  
  7. import sys
  8. print(maxodd(int(line) for line in sys.stdin))
Success #stdin #stdout 0.03s 6376KB
stdin
172
279
864
196
428
641
885
993
700
44
stdout
993