왜 안 돼 코드

def time_formatter(lst, time='', format=['d','h','m','s']):
  if lst == [] or format == []:
    print time
    return time
  else:
    time = unicode(str(lst[-1])) + format[-1] + ' ' + time
    time_formatter(lst[:-1], time, format[:-1])

print 하면 나오는데 왜 리턴을 못 받지-_-;
뭔가 또 잊어먹었나 (...)


아 이런 바보-_-
왜 recursive call 할 때 return을 빼놨었지;

눈이 멀었군 -_-

트랙백

이 글과 관련된 글 쓰기 (트랙백 보내기)
TrackbackURL : http://www.xeraph.com/tb/1193239 [도움말]

덧글

댓글 입력 영역