Computer Science > Computational Thinking And Programming 2 > Data File Handling
Write a Python function that displays all the lines ending with a dot (.) from a text file "Colors.txt". For example, if the file contains: White is a mix of seven colors. What are these seven colors ? VIBGYOR - violet, indigo, blue, green, orange and red. When we mix all these colors we just get one light which is the WHITE light.
Then the output should be : White is a mix of seven colors. VIBGYOR - violet, indigo, blue, green, orange and red.
(Hint: You will have to ignore trailing white spaces to check the last character)
Keep Practicing
Edvaya Target
Board & Competitive Exams Made Easy
Edvaya Target is built for students preparing for JEE (Main & Advanced), NEET UG, and Board Exams (CBSE, ISC & State Boards) — using a practice-first approach that actually works.
Current Question
Community Stats
Track Your Progress
Sign up to save your practice progress, add favorites, and get personalized insights.

