johnny wrote:
> How do I join two string variables?
> I  want to do:  download_dir + filename.

That should do it. :-)

You can concatenate strings using the plus operator. For large number
of strings it is very inefficient. (Particularly in versions of Python
pre 2.4 or in IronPython.)

For these situations it is better to collect the strings in a list and
then join them using :

''.join(list_of_strings)

But for just two strings, plus is fine.

Fuzzyman
http://www.voidspace.org.uk/python/index.shtml

> download_dir=r'c:/download/'
> filename =r'log.txt'
> 
> I want to get something like this:
> c:/download/log.txt

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to