Sword attacks

So I have my character, and 5 sword attacks, but I am at a loss of how to randomly play them when the space bar is pressed. Does anyone know how to do this?

i made a small sword game - just to see if I could do it, i added diferent controls for each sword movement. I plan on setting which ones do more damage, and which ones did more defence, and which ones left you more exposed etc… The controls feel really natural and it is really fun, maybe you should try it too.
http://www.4shared.com/file/32927486/ae41294f/FinishedDummie.html -----Check it out!!!

Randomization is really hard to do, but I found a way. I was messing around a few days ago and I found a funny (And quite complex) way to get things out very randomly. I’ll post it. I made it a sorter, but Check out the way the balls come in.

EDIT: Here it is.

Thanks alot guys!!

randomAttakN=int(GameLogic.getRandomFloat()*3)+1

returns random number from 1 to 3 (1,2,3)

and you can do the following

if randomAttakN==1:
hit1=true
if randomAttakN==2:
hit2=true

…and so on.
This is very usefull python command not only for random hits but for random choices the enemies made in one or another situation.