title: To return a list of digits ofa negative number
body: <p>I tried to convert a number into a list of its digits by converting the number into a linked list.It worked fine for positive numbers but it is not working for negative numbers:
  I tried to do it in this way:</p>
  
  <pre><code>def number_to_list(number):
      head,tail = None,None
      for x in str(number):
          if not x.isdigit():
             a1 = x
             continue
          map(lambda:x,x*a1)
          node = Node(int(x))
          if head:
             tail.next = node
          else:
             head = node
          tail = node
      return head
  </code></pre>
  
  <p>when I call the function <code>head = number_to_list(-120)</code> and later <code>listutils.from_linked_list(head)</code> by using the library to which head is passed as argument it should return [-1,-2,0] but it is returning [].</p>