[Tutor] Help..Concatenaton Error

Alan Gauld alan.gauld at btinternet.com
Fri Jun 12 10:29:52 CEST 2009

"Randy Trahan" <mattie289404 at gmail.com> wrote

> Attached is an error I cannot get to work, I was doing a print 
> concatenation
> but it won't let me get past "+ "ibly impressive. " \
> (then to next line)

You don;t appear to have a quote in front of the string - immediately
after the print statement?

BTW While that is OK as a test of string concatenation it is a very
inefficient way of joining strings and is not considred good style.
You can use the join() method to simplify it


or for string literals like this just miss out the plus signs

print "one" "two" "three"....

Both of these are much more efficient since they don't create
multiple intermediate strings

> Also Programming Lanquage Question:
> lanquage. Will I be able to use Python in web pages as I would of used
> Javascript?  From what I have read there are Python to Javascript
> converters?...

Converters will get you so far but in general no, Python will not
work in a web browser. This is a limitation of the browsers, they
don't have a Python interpreter built in. Iy is possible to get Internet
Explorer to do it using ActiveScripting but then you are confined
to MS Windows users.

Javascript and Flash are the only reliable client end scripting tools
for web pages.

More information about the Tutor mailing list