I am trying to solve a linked list coding challenge in python. And I have given only following class to create a linked list 

```
# Definition for singly-linked list.
class ListNode(object):
    def __init__(self, x):
        self.val = x
        self.next = None

```

I can create a linked list something like this 

```
x = ListNode(1)
x.next = ListNode(4)
x.next.next = ListNode(5)

```

however, How do I create iterativly (inside a for loop)