bloody freshman question regarding strings

Sebastian Roth xsebbi at gmx.de
Sun Jun 23 05:18:22 EDT 2002


On Sonntag, 23. Juni 2002 10:35, Christian Guenther wrote:
> My biggest question at the moment is why can't I do something like
> this:
>
> def mailmsg(severity message opts target recipient):
> 	# first create the message body
> 	msgbody="computer: " + COMPUTER + "\n
> 	         system:   " + SYSTEMTYPE + "\n
> 		 cpu:      " + CPUTYPE + "\n
> 		 kernel:   " + KERNELVER + "\n
> 		 date:     " + DATE + "\n
> 		 \n
> 		 severity: " + severity + "\n
> 		 message:  " + message + "\n\n"
>

a single " means that your string goes over one line in your 
interpreter. If you want to write over more than one line, try """ 
instead of ".

> 	chris

		Sebastian







More information about the Python-list mailing list