On 12/19/2012 01:19 AM, Brandon Merritt wrote:
Sorry, I am just so confused and aggravated as to why this won't work
- why doesn't it print out the whole list? :
number = raw_input('Enter a 7-unit number: ')
for i in number:
count = []
count.append(i)
print count
>>> Enter a 7-unit number: 78953298
['8']
Same exact problem as in your first question:
you are resetting the list inside the loop. You
want to move it outside the loop. You could
also do:
count = [i for i in number]
-m
--
Lark's Tongue Guide to Python: http://lightbird.net/larks/
_______________________________________________
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor