[Tutor] importance of quotes ..
Randall Randall
wolfkin@freedomspace.net
Wed, 10 May 2000 11:19:23 -0400 (EDT)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 10-May-2000 Kevin Liang wrote:
> Hi all,
> I was just working on ch.6, exercise 2 of Learning Python. I
> came to the point when I had copied word-for-word the answer to the question
> (or so I thought), yet it still refused to run properly.. then I looked
> carefully,
> and noticed a *return* statement had '''' quotes instead of `````. I
> changed
> it , and it worked.. Now, I'm a little confused as to why this is so
> important..
> I'm always bogged down on things like this. thanks
The back quotes are used as a kind of shorthand,
where you would otherwise use "repr()". They
convert whatever is inside them into a string.
- --
Wolfkin (wolfkin@freedomspace.net).
Crypto key: www.freedomspace.net/~wolfkin/crypto.text
On a visible but distant shore, a new image of man;
The shape of his own future, now in his own hands.-- Johnny Clegg.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.1 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iD8DBQE5GX378SWFrcg/i1gRAgYXAKCkjquzN8u3cKEGgDUBJ/hGln2N3QCfZRM7
7u6cspvK3Rdr01ujI7ht84A=
=y9RD
-----END PGP SIGNATURE-----