fork download
  1. from random import randint
  2.  
  3. from functools import reduce
  4.  
  5.  
  6. def len_(array):
  7. return reduce(lambda x, y: x + y, map(lambda x: 1, array))
  8.  
  9.  
  10. def enumerate_(array):
  11. print("I DON'T KNOW")
  12. return
  13.  
  14.  
  15. def test():
  16. for _ in range(100):
  17. array = [randint(-10, 10) for _ in range(randint(5, 5))]
  18. assert len_(array) == len(array), 'Not really ok'
  19.  
  20. print("OK")
  21.  
  22.  
  23. if __name__ == '__main__':
  24. test()
  25.  
Success #stdin #stdout 0.15s 12264KB
stdin
Standard input is empty
stdout
OK