randomize a list


/ Published in: Other
Save to your folder(s)



Copy this code and paste it in your HTML
  1. if out_of_order_events:
  2. randomized_logfile_lines = []
  3. while len(logfile_lines):
  4. randomized_logfile_lines.append(logfile_lines.pop(random.randrange(0,len(logfile_lines))))
  5. logfile_lines = randomized_logfile_lines

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.