Dictionaries by default do not maintain the order of the elements in the sequence in which they were entered. There might be some cases where we would like to have that. In those cases, we can use Ordered Dictionaries.
An Ordered Dictionary is a variant of a dictionary that maintains the order of the elements in the way they were added. The example below gets the count of every word in the string and prints the words in the order they appeared.