Randomizing a list of 25 things using Python

I got tagged in the oh-so popular “25 Random Things” meme on Facebook. To make a point that I sometimes think in code and I don’t think its weird, I wrote the script below to randomize my list before I posted it.


import random

f = open('25-things.txt')
list = f.readlines()
"""Magnus L Hetland's solution http://bit.ly/uN4iq"""
result = []

for i in range(len(list)):
    element = random.choice(list)
    list.remove(element)
    result.append(element)

i = 1
for line in result:
    print "%s. %s" % (i, line)
    i += 1

Truth in advertising

The message in the picture below is from Fidelity Investments letting me know that one of the plans I invest in is changing its name.

“This notification is to inform you that effective January 16, 2009, Fidelity Select Utilities Growth Portfolio will be renamed Fidelity Select Utilities Portfolio.”

Its should come as no surprise to note that this fund hasn’t been doing a whole lot of growing in the past year.

Growth fund's *name* is down-graded