[Tutor] Hello World in Python without space

Robert H hrobert25 at hotmail.com
Sun Jul 10 13:12:39 CEST 2011


Dear all,


I have Python 3.2 installed on Windows 7. I am a complete beginner playing around with the basic functions. My problem is the following script:


name="world"
print("Hello", name,"!")


The result is:
Hello world !


However, I don't want the space before the exclamation mark. I want this:
Hello world!


I tried to solve the problem with e.g.:
print("Hello",name.strip(),"!")
but the result is the same.


Can anyone out there help me? Thank you.


Regards,
Robert
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20110710/3ede54b0/attachment.html>


More information about the Tutor mailing list