Dictionary
Dictionary
Program to print only the repeated characters and count of the same.
Write a program to count the number occurrences of each item in the list without
using any inbuilt functions
names = ['apple', 'google', 'apple', 'yahoo', 'google', 'facebook', 'gmail',
'yahoo']
"Write a program to get all the duplicate items and the number of times the item is
repeated in the list.
>>> names = ['apple', 'google', 'apple', 'yahoo', 'yahoo', 'facebook', 'apple',
'gmail', 'gmail', 'gmail', 'gmail']"
Write a program to map a product to a company and build a dictionary with company
and list of products pair
>>> all_products = ['iPhone', 'Mac', 'Gmail', 'Maps', 'iWatch', 'Windows', 'iOS',
'Google Drive', 'One Drive']
Comprehensions
---------------
Building a dict of word and length pair
words = "This is a bunch of words"