Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #74321
| From | John Gordon <gordon@panix.com> |
|---|---|
| Newsgroups | comp.lang.python |
| Subject | Re: I am confused about ' and " |
| Date | 2014-07-10 17:16 +0000 |
| Organization | PANIX Public Access Internet and UNIX, NYC |
| Message-ID | <lpmhp2$f1u$1@reader1.panix.com> (permalink) |
| References | <cfa25009-b200-4fcc-beb7-83634546cd20@googlegroups.com> |
In <cfa25009-b200-4fcc-beb7-83634546cd20@googlegroups.com> fl <rxjwg98@gmail.com> writes:
> Please tell me because I have looked it around for one hour about it.
There is no difference between ' and " when used to enclose strings, with
one exception: a double-quoted string can contain single-quotes without the
need to escape them with a backslash, and vice-versa.
For example:
string2 = "It's a beautiful day in the neighboorhood."
string1 = 'He said to me, "Hello Thomas."'
--
John Gordon Imagine what it must be like for a real medical doctor to
gordon@panix.com watch 'House', or a real serial killer to watch 'Dexter'.
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
I am confused about ' and " fl <rxjwg98@gmail.com> - 2014-07-10 10:01 -0700 Re: I am confused about ' and " John Gordon <gordon@panix.com> - 2014-07-10 17:16 +0000 Re: I am confused about ' and " Chris Angelico <rosuav@gmail.com> - 2014-07-11 03:57 +1000 Re: I am confused about ' and " Joel Goldstick <joel.goldstick@gmail.com> - 2014-07-10 14:12 -0400 Re: I am confused about ' and " Chris “Kwpolska” Warrick <kwpolska@gmail.com> - 2014-07-10 20:25 +0200
csiph-web