- #1
jumbogala
- 423
- 4
Problem statement:If you have a list, how do you count the
Problem statement:
If you have a list, how do you count the number of characters in that list?
For example, if the list is list=['happy', 'sad', 'angry'], how do I get the program to tell me there are 13 characters in the list?
Attempt at a solution:
I tried doing for char in list:
print char
But that only printed each item in the list one by one...
I can't think of what else to try. Any ideas?
Problem statement:
If you have a list, how do you count the number of characters in that list?
For example, if the list is list=['happy', 'sad', 'angry'], how do I get the program to tell me there are 13 characters in the list?
Attempt at a solution:
I tried doing for char in list:
print char
But that only printed each item in the list one by one...
I can't think of what else to try. Any ideas?
Last edited: