[Tutor] string integers?

Mark Lawrence breamoreboy at yahoo.co.uk
Sun Feb 12 16:22:19 CET 2012


On 12/02/2012 14:51, Dave Angel wrote:
> On 02/12/2012 08:25 AM, William Stewart wrote:

[snipped]

> My usual advice when seeing a beginner with a complex line that gives a
> syntax error is to see if you can replace it by a few simpler lines.
> Then the error might be more obvious. So use several print lines. So
> what if the output isn't quite right; you have some more debugging to do
> before you'll even see that output.
>

For the OP.

print str1, "*", str2, "*", int1, "*"int2  "=", str1, * str2, * int1 * 
int 2

To print all of this on one line you can use
print str1,
print "*",
etc

See http://docs.python.org/tutorial/inputoutput.html

-- 
Cheers.

Mark Lawrence.



More information about the Tutor mailing list