fork(5) download
  1. # test https://stackoverflow.com/questions/1582356/fastest-way-of-finding-the-middle-value-of-a-triple
  2. from itertools import product
  3.  
  4. for a, b, c in product("abc", repeat=3):
  5. if max(min(a,b), min(max(a,b),c)) != sorted([a,b,c])[1]:
  6. raise AssertionError((a,b,c))
Success #stdin #stdout 0s 24080KB
stdin
Standard input is empty
stdout
Standard output is empty