Friday, August 15, 2008

First Post

Ok... So, I couldn't resist the temptation of having a title of first post.

Why? Well, because I can't be bother to do it anywhere else on the internet, so I thought I would use it here.

Welcome to those of you who have managed to find my blog, I hope to treat your all with some interesting tid-bits of programming, geeky stuff and a little bit of anything else. My present to people reading the first post here is a little bit of python that we came up with after a game of golf (python golf that is).
print[x for x in range(2,1e3)if all(x%_ for _ in range(2,x))]

What does this do? Well you run it for yourself (or are feeling adventurous, you could work it out by hand).

1 comment:

  1. First comment!

    I haven't used the all function before, but because python is just enlightened pseudocode, I'm going to guess it prints out all the prime numbers between 2 and 999 inclusive.

    ReplyDelete