Error in printing the dictionary

Here after making the list of titles and traversing it in order to print all the length I am getting the list of length of each movie title printed. However when I am introducing the empty dictionary to get the frequency and the corresponding number of movies I am getting the following error:

Please guide.

Hello @Charu510, sorry for the delay, here we can, first of all, check the data type of it and if it is a string then we can find out its the length otherwise if it has some other data-type we can simply ignore that and move on to the next one.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.