class Node(object):
    def __init__(self, val, next=None):
        self.val = val
        self.next = next

    def __repr__(self):
        return '{val}'.format(val=self.val)


class LinkedList(object):
    def __init__(self, values=None, head=None):
        self.head = head
        self.length = 0

    def __repr__(self):
        pass

    def __len__(self):
        pass

    def __iter__(self):
        pass

    def size(self):
        pass

    def search(self):
        pass

    def display(self):
        pass

    def remove(self):
        pass

    def insert(self):
        pass

    def pop(self):
        pass

class Node(object):
    def __init__(self, val, next=None):
        self.val = val
        self.next = next

    def __repr__(self):
        return '{val}'.format(val=self.val)


class LinkedList(object):
    def __init__(self, iterable=()):
        self._current = None
        self.head = None
        self.length = 0
        for val in reversed(iterable):
            self.insert(val)

    def __repr__(self):
        '''Print string representation of Linked List.'''
        node = self.head
        output = ''
        for node in self:
            output += '{!r}'.format(node.val)
        return '({})'.format(output.rstrip(' ,'))

    def __len__(self):
        return self.length

    def __iter__(self):
        if self.head is not None:
            self._current = self.head
        return self

    def next(self):
        if self._current is None:
            raise StopIteration
        node = self._current
        self._current = self._current.next
        return node

    def insert(self):
        pass

    def size(self):
        pass

    def search(self):
        pass

    def display(self):
        pass

    def remove(self):
        pass

    def pop(self):
        pass

Update magic methods, and reorg args.
Update magic methods, and reorg args.

  class Node(object):
      def __init__(self, val, next=None):
          self.val = val
          self.next = next
  
      def __repr__(self):
          return '{val}'.format(val=self.val)
  
  
  class LinkedList(object):
-     def __init__(self, values=None, head=None):
+     def __init__(self, iterable=()):
+         self._current = None
-         self.head = head
+         self.head = None
          self.length = 0
+         for val in reversed(iterable):
+             self.insert(val)
  
      def __repr__(self):
-         pass
+         '''Print string representation of Linked List.'''
+         node = self.head
+         output = ''
+         for node in self:
+             output += '{!r}'.format(node.val)
+         return '({})'.format(output.rstrip(' ,'))
  
      def __len__(self):
-         pass
+         return self.length
  
      def __iter__(self):
+         if self.head is not None:
+             self._current = self.head
+         return self
+ 
+     def next(self):
+         if self._current is None:
+             raise StopIteration
+         node = self._current
+         self._current = self._current.next
+         return node
+ 
+     def insert(self):
          pass
  
      def size(self):
          pass
  
      def search(self):
          pass
  
      def display(self):
          pass
  
      def remove(self):
          pass
  
-     def insert(self):
-         pass
- 
      def pop(self):
          pass
  
Update magic methods, and reorg args.
## Code Before:
class Node(object):
    def __init__(self, val, next=None):
        self.val = val
        self.next = next

    def __repr__(self):
        return '{val}'.format(val=self.val)


class LinkedList(object):
    def __init__(self, values=None, head=None):
        self.head = head
        self.length = 0

    def __repr__(self):
        pass

    def __len__(self):
        pass

    def __iter__(self):
        pass

    def size(self):
        pass

    def search(self):
        pass

    def display(self):
        pass

    def remove(self):
        pass

    def insert(self):
        pass

    def pop(self):
        pass

## Instruction:
Update magic methods, and reorg args.
## Code After:
class Node(object):
    def __init__(self, val, next=None):
        self.val = val
        self.next = next

    def __repr__(self):
        return '{val}'.format(val=self.val)


class LinkedList(object):
    def __init__(self, iterable=()):
        self._current = None
        self.head = None
        self.length = 0
        for val in reversed(iterable):
            self.insert(val)

    def __repr__(self):
        '''Print string representation of Linked List.'''
        node = self.head
        output = ''
        for node in self:
            output += '{!r}'.format(node.val)
        return '({})'.format(output.rstrip(' ,'))

    def __len__(self):
        return self.length

    def __iter__(self):
        if self.head is not None:
            self._current = self.head
        return self

    def next(self):
        if self._current is None:
            raise StopIteration
        node = self._current
        self._current = self._current.next
        return node

    def insert(self):
        pass

    def size(self):
        pass

    def search(self):
        pass

    def display(self):
        pass

    def remove(self):
        pass

    def pop(self):
        pass
