How to assign a keyboard short cut to animation in unity ?

Hi all,

I am new to unity 3d,going through the basics.I just need a small help.
I have a character and a animation to it.Can anyone please help me in describing the process or any tutorial link, that shows how to apply animation to character in unity and assign keyboard short cut to playing the animation with my key board…Pleaseeeeeee

Regards
Suresh

void Update () {
if(Input.GetKeyUp(“space”))
{
animation.Play();
}
}

Place this code in a C# script and add that script to your character. When you release the space key, the animation will play.