fork(4) download
  1. from itertools import product
  2.  
  3.  
  4. def sorted_descending(a, b, c):
  5. return [[[(a, b, c), (a, c, b)], [None, (c, a, b)]],
  6. [[(b, a, c), None], [(b, c, a), (c, b, a)]]][a < b][a < c][b < c]
  7.  
  8.  
  9. for args in product("abc", repeat=3):
  10. if sorted_descending(*args) != tuple(sorted(args, reverse=True)):
  11. raise AssertionError(args)
  12.  
Success #stdin #stdout 0s 23304KB
stdin
Standard input is empty
stdout
Standard output is empty