Slot2
Slot2
Slot2
1 Write a function in python to count the number of lines from a text file "story.txt"
which is not starting with an alphabet "T".
Example: If the file "story.txt" contains the following lines:
A boy is playing there.
There is a playground.
An aeroplane is in the sky.
The sky is pink.
Alphabets and numbers are allowed in the password.
The function should display the output as 3
2 Write a function in Python to count words in a text file those are ending with
alphabet "e".
Input: India is the fastest-growing economy. India is looking for more investments around
the globe.
Output: Total count: 2
3 Using a lambda function to sort a list of strings by the last character