Read all lines in file and execute in a random order
Question: I would like to create a python script that reads an input file in a random
order rather than sequentially while running through a loop, so each time the
script runs it would always run in a random order.

Is this possible?


Answer: This is certainly possible. I'd use `File.readlines` to get the lines of the
file and then shuffle it in-place with `random.shuffle`. Your script might
look something like

    
    
    import random as r
    lines = file("/path/to/input/file", 'r').readlines()
    r.shuffle(lines)
    
    #Proceed with script
    

