Practical List – FUNCTIONS
Write a function countNow(PLACES) in Python, that takes the dictionary, PLACES
as an argument and displays the names (in uppercase)of the places whose names
are longer than 5 characters.
For example, Consider the following dictionary
PLACES={1:"Delhi",2:"London",3:"Paris",4:"New York",5:"Doha"}
The output should be: LONDON NEW YORK
4
Write a function, lenWords(STRING), that takes a string as an argument and returns
a tuple
containing length of each word of a string. For example, if the string is
"Come let us have some fun",
the tuple will have (4, 3, 2, 4, 4, 3)
5
TEXT File
6.
9 Write a Python function that displays all the words containing @cmail from a text file "[Link]".
10 Write a Python function that finds and displays all the words longer than 5 characters from a text file "[Link]".