[Tutor] Help Passing Variables

Daniel Gulko dangulko at hotmail.com
Fri Oct 19 17:40:15 CEST 2012


Thanks David. This has been helpful in understanding a bit more on how parameters are passed through.

> Date: Thu, 18 Oct 2012 04:44:55 -0400
> Subject: Re: [Tutor] Help Passing Variables
> From: dwightdhutto at gmail.com
> To: dangulko at hotmail.com
> CC: tutor at python.org
> 
> #A little more complex in terms of params:
> 
> def SwapCaseAndCenter(*kwargs):
> 
> 	if upper_or_lower == "upper":
> 		print a_string.center(center_num).upper()
> 
> 	if upper_or_lower == "lower":
> 		print a_string.center(center_num).lower()
> 
> a_string = raw_input("Give me a word, or letter: ")
> upper_or_lower = raw_input("upper, or lower character(s): ")
> center_num = int(raw_input("Where should number be centered?: "))
> SwapCaseAndCenter(a_string, upper_or_lower, center_num)
> 
> 
> 
> -- 
> Best Regards,
> David Hutto
> CEO: http://www.hitwebdevelopment.com
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20121019/e4fc5ed3/attachment.html>


More information about the Tutor mailing list