View Single Post
Old 02-12-2009, 01:50 PM   #4
gwynevans
Wizzard
gwynevans ought to be getting tired of karma fortunes by now.gwynevans ought to be getting tired of karma fortunes by now.gwynevans ought to be getting tired of karma fortunes by now.gwynevans ought to be getting tired of karma fortunes by now.gwynevans ought to be getting tired of karma fortunes by now.gwynevans ought to be getting tired of karma fortunes by now.gwynevans ought to be getting tired of karma fortunes by now.gwynevans ought to be getting tired of karma fortunes by now.gwynevans ought to be getting tired of karma fortunes by now.gwynevans ought to be getting tired of karma fortunes by now.gwynevans ought to be getting tired of karma fortunes by now.
 
gwynevans's Avatar
 
Posts: 1,402
Karma: 2000000
Join Date: Nov 2007
Location: UK
Device: iPad 2, iPhone 6s, Kindle Voyage & Kindle PaperWhite
Nice - A couple of minor points that might help reduce your typing are the way that you can use either "" or '' as string delimiters - the advantage being that you don't need to escape the use of the other one in the string! Also, Python's got a string formatter type, so you can write things such as
print "<h2>%s</h2>" % firstletter
or
print '<a href="#author_%s">%s</a><br>\n' % (id, name)
gwynevans is offline   Reply With Quote