Re: [Tutor] broken script - curiouser and curiouser

2011-07-10 Thread Lisi
On Thursday 07 July 2011 15:36:06 Michael M Mason wrote: > Maybe you've been editing ex25 and then executing ex26. That'd get you the > same error in the same place over and over again. Doh! They do say that there is one born every minute. Thanks, Lisi __

Re: [Tutor] Hello World in Python without space

2011-07-10 Thread Alan Gauld
"Robert H" wrote name="world" print("Hello", name,"!") Hello world ! However, I don't want the space before the exclamation mark. I want this: Hello world! Can anyone out there help me? Thank you. I see you've already had two answers, a third is to construct the string before printing it.

Re: [Tutor] Hello World in Python without space

2011-07-10 Thread Peter Otten
Robert H wrote: > 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

Re: [Tutor] Hello World in Python without space

2011-07-10 Thread Izz ad-Din Ruhulessin
Sending args to the print command always puts spaces between them. Try: print("Hello {name}!".format(name=name)) 2011/7/10 Robert H > 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 sc

[Tutor] Hello World in Python without space

2011-07-10 Thread Robert H
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