Andrej Viktorovich wrote: > What is difference between string definitions: > s="aaa" > and > s='bbb'
There's no difference. It helps you avoid explicit escapes, i. e. >>> "What's up?" "What's up?" is a tad more readable than >>> 'What\'s up' "What's up" Likewise, multiline strings are easier to read when written as >>> """foo ... bar ... baz ... """ 'foo\nbar\nbaz\n' than >>> "foo\nbar\nbaz\n" 'foo\nbar\nbaz\n' If you do not want to mess up indentation implicit string concatenation is sometimes useful. With that >>> if True: ... """foo ... bar ... baz ... """ ... 'foo\nbar\nbaz\n' may be rewritten as >>> if True: ... ( ... "foo\n" ... "bar\n" ... "baz\n" ... ) ... 'foo\nbar\nbaz\n' -- https://mail.python.org/mailman/listinfo/python-list