fork download
  1. #!/bin/python
  2. from functools import reduce
  3. import sys
  4.  
  5. def adder(the_dict):
  6. def somerandomname(x,y):
  7. return x + the_dict[y]
  8. return reduce(somerandomname,the_dict, '')
  9.  
  10. d={'a':'fuck ','b':'this ','c':'pluses '}
  11. print('d is\n',d)
  12. print(adder(d))
Success #stdin #stdout 0.02s 9016KB
stdin
Standard input is empty
stdout
('d is\n', {'a': 'fuck ', 'c': 'pluses ', 'b': 'this '})
fuck pluses this