[Tutor] I don't understand why it doesn't work :(

Guillaume willblake@wanadoo.fr
Tue Jun 3 08:22:03 2003


C'est un message de format MIME en plusieurs parties.

------=_NextPart_000_0000_01C329DB.F5A03600
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

Hi,
My problem is quite simple.
Here is the prog:
 s = "3 * 4"
print type (s)
<type 'str'>

Easy but then I tried:
print int (s) + 5
I was waiting for something like 17
but it doesn't work :(
Why?
This is my only question.
Thanx

------=_NextPart_000_0000_01C329DB.F5A03600
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 http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 5.50.4134.100" name=3DGENERATOR></HEAD>
<BODY>
<DIV><FONT face=3D"Arial Narrow"><SPAN=20
class=3D380481912-03062003>Hi,</SPAN></FONT></DIV>
<DIV><FONT face=3D"Arial Narrow"><SPAN class=3D380481912-03062003>My =
problem is=20
quite simple.</SPAN></FONT></DIV>
<DIV><FONT face=3D"Arial Narrow"><SPAN class=3D380481912-03062003>Here =
is the=20
prog:</SPAN></FONT></DIV>
<DIV><FONT face=3D"Arial Narrow"><SPAN =
class=3D380481912-03062003>&nbsp;s =3D "3 *=20
4"</SPAN></FONT></DIV>
<DIV><FONT face=3D"Arial Narrow"><SPAN class=3D380481912-03062003>print =
type=20
(s)</SPAN></FONT></DIV>
<DIV><FONT face=3D"Arial Narrow"><SPAN =
class=3D380481912-03062003>&lt;type=20
'str'&gt;</SPAN></FONT></DIV>
<DIV><FONT face=3D"Arial Narrow"><SPAN=20
class=3D380481912-03062003></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=3D"Arial Narrow"><SPAN class=3D380481912-03062003>Easy =
but then I=20
tried:</SPAN></FONT></DIV>
<DIV><FONT face=3D"Arial Narrow"><SPAN class=3D380481912-03062003>print =
int (s) +=20
5</SPAN></FONT></DIV>
<DIV><FONT face=3D"Arial Narrow"><SPAN class=3D380481912-03062003>I was =
waiting for=20
something like 17</SPAN></FONT></DIV>
<DIV><FONT face=3D"Arial Narrow"><SPAN class=3D380481912-03062003>but it =
doesn't=20
work :(</SPAN></FONT></DIV>
<DIV><FONT face=3D"Arial Narrow"><SPAN=20
class=3D380481912-03062003>Why?</SPAN></FONT></DIV>
<DIV><FONT face=3D"Arial Narrow"><SPAN class=3D380481912-03062003>This =
is my only=20
question.</SPAN></FONT></DIV>
<DIV><FONT face=3D"Arial Narrow"><SPAN=20
class=3D380481912-03062003>Thanx</SPAN></FONT></DIV></BODY></HTML>

------=_NextPart_000_0000_01C329DB.F5A03600--