[BangPypers] Another qn. THanks for the basic of basic qn\
L Radhakrishna Rao
satishsagar83 at gmail.com
Tue May 7 08:17:59 CEST 2013
Are you looking for something like this:
>>> Str = '23'
>>> Sum = 0
>>> for i in list(Str):
... Sum = Sum + int(i)
On Tue, May 7, 2013 at 11:41 AM, Umesh Tiptur <umeshreloaded at yahoo.com>wrote:
> Hi all,
> Thanks for the reply for the basic of basic qn:
> But still I am stuck with another problem, i.e I want to add a number
> which is 23.
> I want a digit answer in this case.
> Any idea how to split a number into digits to add them.
> With regards,
> BangPypers mailing list
> BangPypers at python.org
More information about the BangPypers