Some other great examples:
https://mkaz.tech/code/python-string-format-cookbook/

On Wednesday, October 11, 2017 at 7:56:30 PM UTC-5, Simon Anderson wrote:
>
> +1 :)
>
> On Thursday, 12 October 2017 11:50:02 UTC+11, damonshelton wrote:
>>
>> I would suggest utilizing keywords rather than order - also a nice trick 
>> is expanding locals to keep from having to specify the keywords repeatedly
>>
>> def sayHello(name=None, age=None, weight=None ):
>>     print( "name: {name} age:{age} weight:{weight}").format(**locals())
>>
>> sayHello("Allen", 20, 150)
>>
>> ​
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/7349111f-c820-41ee-b97f-c549db66a772%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to