JOA cool thing I found that you can with .format is to prepare a string for later expansion: prepared = 'Hello {}'.format prepared('world') 'Hello world' If you want to do that using %, I suppose you would need at least a lambda.Comment·Thread·Apr 26, 2017·1·What is the difference between %, and .format string formatting options in Python? Which is better, for when?
JOIn Python: the fact that default arguments are calculated at definition time. Completely obvious in retrospect, but well, I was young.Comment·Thread·Apr 24, 2017·2·What are some interesting gotcha's you've come across when learning a new language, framework, etc.