Python for x in list basic question
<p>I am trying to create a function which will load a whole lot of images and map them to appropriate names in PyGame. I'm not all that great with python and this really has me stuck. My current code is this:</p>

<pre><code>tile1 = pygame.image.load("/one.bmp")
tile2 = pygame.image.load("/two.bmp")
tile3 = pygame.image.load("/three.bmp")
</code></pre>

<p>and it keeps going on for about 20 tiles. The thing is I just found out that I need a lot more and was wondering how I could do this using a <em>for x in y</em> loop. My basic idea was:</p>

<pre><code>tile = ['/one.bmp', '/two.bmp', '/three.bmp']
tilelist = [1,2,3]
for tile in tile:
    tilelist[x] = pygame.image.load(tile)
</code></pre>

<p>or something like that but I'm not quite there. I was also wondering if it could be done using dictionaries. </p>

<p>Any help would be appreciated, thanks :)</p>
