Thanks Steve, Alan. Sound advice. Very much a novice so trying to pick up good habits. Will definitely take on board your comments! Thanks again. Jignesh
On 10 December 2013 00:46, Alan Gauld <alan.ga...@btinternet.com> wrote: > On 09/12/13 23:46, Steven D'Aprano wrote: > > Python has two different quote characters ' and " so you can use one for >> delimiters and the other inside the string: >> > > And if you need both you can also use triple quotes. > > > If you need both, you can escape the one that matches the delimiter: >> >> s = 'this string contains both \' single and " double quotes' >> > > Or using triple quotes: > > > s = '''this string contains both ' single and " double quotes''' > > Python will then do the escaping for you. > > -- > Alan G > Author of the Learn to Program web site > http://www.alan-g.me.uk/ > http://www.flickr.com/photos/alangauldphotos > > > _______________________________________________ > Tutor maillist - Tutor@python.org > To unsubscribe or change subscription options: > https://mail.python.org/mailman/listinfo/tutor >
_______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor