Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # length_counts_function
- list_of_african_countries = ["nigeria", "angola", "ghana", "south africa", "libya"]
- def length_counts_function(list_of_african_countries):
- new = {}
- for list in list_of_african_countries:
- if len(list) in new:
- new[len(list)] +=1
- else:
- new[len(list)] = 1
- return new
- length_counts_function(list_of_african_countries)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement