Conversation
|
DONE! |
| Returns the number of words in the English `dictionary`. | ||
| """ | ||
| pass | ||
| return len(list(dictionary)) |
There was a problem hiding this comment.
no need to transform dictionary into a list! you can just call len(dictionary)
| # Return the sum of all the numbers in lst. If lst is empty, return 0. | ||
| def sum_list(lst): | ||
| return 0 | ||
| sum = 0 |
|
python has lots of built-in functions! http://docs.python.org/2/library/functions.html (e.g. sum, sorted, max, min, ...) Learning how to use these effectively will make your code look better, simpler, and more "python"-ic! |
|
Oh wow I'm doing way too much work. Okay I'll take a look at that website On Monday, November 18, 2013, Kenny Yu wrote:
|
| vowels = ['a', 'e', 'i', 'o', 'u', 'A', 'E', 'I', 'O', 'U'] | ||
| for letter in s: | ||
| if letter in vowels: | ||
| news = news.replace(letter, "") |
There was a problem hiding this comment.
no need to have the 'for letter in s' loop--just loop over vowels and remove them from s!
|
woooooo you finished! awesome use of git! |
No description provided.