Re: [Tutor] xml parsing from xml

2014-05-10 Thread Stefan Behnel
Stefan Behnel, 10.05.2014 10:57: > Danny Yoo, 07.05.2014 22:39: >> If you don't want to deal with a event-driven approach that SAX >> emphasizes, you may still be able to do this problem with an XML-Pull >> parser. You mention that your input is hundreds of megabytes long, in >> which case you pro

Re: [Tutor] HELP! How do I remove the black after "s="

2014-05-10 Thread Steven D'Aprano
Hello "1 2", and welcome! (By the way, I feel quite silly calling you by the name you show in your email address. Do you have another name you would prefer to be known by?) My response below. On Sat, May 10, 2014 at 02:35:07PM +0800, 1 2 wrote: > In the result it shows "s= 8" pls tell me how

Re: [Tutor] xml parsing from xml

2014-05-10 Thread Stefan Behnel
Danny Yoo, 07.05.2014 22:39: > If you don't want to deal with a event-driven approach that SAX > emphasizes, you may still be able to do this problem with an XML-Pull > parser. You mention that your input is hundreds of megabytes long, in > which case you probably really do need to be careful abou

Re: [Tutor] HELP! How do I remove the black after "s="

2014-05-10 Thread Alan Gauld
On 10/05/14 07:35, 1 2 wrote: In the result it shows "s= 8" pls tell me how to remove the blank? s,t,n = 0,0,1 while t <= s: s,t,n = s+2,t+n,n+1 else: print('s=',s,n) Assuming you are using Python version 3 you need to specify the sep option to print: print('s=',s,n,sep='') >>> h

Re: [Tutor] HELP! How do I remove the black after "s="

2014-05-10 Thread Chris “Kwpolska” Warrick
On Sat, May 10, 2014 at 8:35 AM, 1 2 wrote: > In the result it shows "s= 8" pls tell me how to remove the blank? > > s,t,n = 0,0,1 > while t <= s: > s,t,n = s+2,t+n,n+1 > else: > print('s=',s,n) You must use something else. For example: print('s={0} {1}'.format(s, n)) This will pro

[Tutor] HELP! How do I remove the black after "s="

2014-05-10 Thread 1 2
In the result it shows "s= 8" pls tell me how to remove the blank? s,t,n = 0,0,1 while t <= s: s,t,n = s+2,t+n,n+1 else: print('s=',s,n) ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.or