def grabar(): a = raw_input('Ingrese texto : ') texto=open('texto.txt','w') texto.write(a) texto.close()#llamar a la funcióngrabar()