[Tutor] Help with converting a string into a integer
Carmen Salcedo
asc239 at live.com
Thu Oct 31 19:51:17 CET 2013
Thanks Bob! :) I'm very new at programming in Python. I appreciate your feedback.
Have a great week!
Sent from my iPhone
On Oct 31, 2013, at 1:07 PM, "bob gailer" <bgailer at gmail.com> wrote:
> On 10/31/2013 10:11 AM, Carmen Salcedo wrote:
>> Thanks Bob! :) A list is great idea. I'm just trying to figure out how to print the number across like a phone number 555-5555 instead of downward. I'm stuck on that.
>
> I repeat what I said before:
>>
>> There are many ways to get the desired output.
>> One is:
>> collect the characters in one list, say numberList
>> Then use slicing to insert the "-" e.g. numberList[3:3] = "-"
>> Then print "".join(numberList)
>
> --
> Bob Gailer
> 919-636-4239
> Chapel Hill NC
>
More information about the Tutor
mailing list