[Tutor] special translations
Katharine Stoner
kstoner@netins.net
Sun, 20 May 2001 18:50:54 -0500
This is a multi-part message in MIME format.
------=_NextPart_000_0021_01C0E15D.CC9B1EA0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hi to all Python people,
I wanted to know if anyone knows how to tell python to take a space you =
left and turn it into a character.
ex:
if ltter =3D=3D 'space':
print '~'
When Ieave a space in the above space part in the code it gives me an =
error. How can you tell python that the space is okay and for it to =
print the symbol.
-Cameron
------=_NextPart_000_0021_01C0E15D.CC9B1EA0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2614.3500" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hi to all Python people,</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>I wanted to know if anyone knows how to =
tell python=20
to take a space you left and turn it into a character.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>ex:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>if ltter =3D=3D=20
'space':<BR> print =
'~'</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>When Ieave a space in the above space =
part in the=20
code it gives me an error. How can you tell python that the space =
is okay=20
and for it to print the symbol.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>-Cameron</FONT></DIV></BODY></HTML>
------=_NextPart_000_0021_01C0E15D.CC9B1EA0--