No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
4 Posted Topics
# You can just use sympy (e.g., 2000 digits): import sympy print sympy.N(sympy.E, 2000)
text="Hier goes your text" def countWords(list_item): d,words= {},list_item.split() for i in xrange(len(words)): item = words[i] count = words.count(item) d[item] = count return sorted(d.items(), key = lambda item: item[1], reverse=True) print countWords(text)
One of the fastest ways to produce fibonaccis is with a matrix. The given code here produces the first 1000 fibs in a flash of a second: f=[1]+[0]+[1] for i in xrange(1000): f[-1]=sum(f[:-1]) f[:-1]=f[1:] print f[0],
import itertools s='workmen' print ["".join(map(str,x)) for x in itertools.permutations(list(s),len(s))]
The End.
Stefan_3