Tkinter function variable passing



How to pass the variables defined inside the function to the another
function on click event of the button in Tkinter?
pleas send me a sample code if anybody has it.
thanx

.