Edit: for _ in range(4):
Edit: for _ in range(4):
For example try to run the following script (not from the REPL):
_ = 12
print _
42 * 42
print _ return [random.randint(1,10000) for x in range(4)]
Also remember that a little kitten dies every time you write a for loop as follows: for index in range(len(some_list)):range(len(some_list)) is a convoluted way iterating over the elements of a list. What you are doing is creating a new list with elements [0,... lengh-1] and iterating over the elements of this list, only to immediately throw them away after using them as array index to grab the item you really want from the original list.
Instead you can just directly iterate over your original list: "for item in some_list". If you really need to know the index value, you can use enumerate: "for index, item in enumerate(some_list)"
One nice thing is that the "for x in y" lets you iterate over things (iterables) that you may be generating on the fly (e.g., all prime numbers smaller than N).