Then Isaac's function does that(but you have to leave a space after
last number in the string).
a, b = 0, ""
for i in x:
if i != " ":
b += i
print ("this is b", b)
a += int(b)
print ("this is a",a)
b = ""
print ("final a ",a)
foo("10 5 8 ")
On Wed, Oct 12, 2016 at 11:35 PM, Alan Gauld via Tutor <firstname.lastname@example.org> wrote:
> On 12/10/16 17:58, D.V.N.Sarma డి.వి.ఎన్.శర్మ wrote:
>> Sorry, I did not read the conditions that split and for should not be used.
> It is even more confusing - split() may NOT be used
> but 'for' MUST be used...
> Alan G
> Author of the Learn to Program web site
> Follow my photo-blog on Flickr at:
> Tutor maillist - Tutor@python.org
> To unsubscribe or change subscription options:
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options: