Wipro interview question

Q: How would you write a python script that automatically sends a specific data from a text file that may have a hundred logs. Q:If you had to visualize a android audio settings, how would you test if the audio speakers work.