[Tutor] Concatenating Strings

Jeremy Duenas jduenas23 at gmail.com
Tue May 29 04:00:48 CEST 2012


I am trying to understand the point behind using the  '+' character when
trying to concatenate strings. I am new to learning Python and going through
the book "Python Programming for Absolute Beginners 3rd ed."  and do not
understand the point or reason for concatenating strings. The reason I do
not understand is when experimenting to understand what was being taught I
wrote:

 

print("\nThis string" "may not" "seem terr" "ibly impressive")

 

then wrote:

 

print("\nThis string" + "may not" + "seem terr" + "ibly impressive")

 

 

and the both printed the same output..so why would I want to use  '+' to add
strings if there seems to be no reason too?

 

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20120528/ef37f5b2/attachment.html>


More information about the Tutor mailing list