PROGRAMMING:Dictionary application - find out the most frequent string (higher education society, python programming basis and application exercise 7-6)
Write a program to read an unspecified number of strings from the keyboard, one for each line, with the string "Q" as the end of the input flag ("Q" is not included in the statistical range). Use the dictionary to find the string with the most occurrences, and print the string and its occurrences.
Note: the test case of this question will ensure that only one string appears the most times.
###Input format:
String 1 < br > 1
String 2 < br > 2
...
String n < br > n
q
###Output format:
Number of string occurrences
###Input example:
```in
abc
abc
bcd
xxx
q
```
###Output example:
```out
abc 2
```
answer:If there is no answer, please comment
Note: the test case of this question will ensure that only one string appears the most times.
###Input format:
String 1 < br > 1
String 2 < br > 2
...
String n < br > n
q
###Output format:
Number of string occurrences
###Input example:
```in
abc
abc
bcd
xxx
q
```
###Output example:
```out
abc 2
```
answer:If there is no answer, please comment