Text file reading and printing data
as you say, it does look like this code is doing exactly what you want. But it also looks like you are repeating yourself in a couple of places.

If it was me, I would prefer to loop through the file only once and check for both Sample Text and Time Taken at the same time, and then only print out if the sample text is there:

def my_read(my_text):
    time_taken, sample_text = False, False
    with open(my_text) as f:
        for i in f:
            time_taken = ' '.join(i.split()) if 'Time Taken' in i else time_taken
            sample_text = 'I have found it!' if 'Sample Text' in i else sample_text

    # now, if sample text was found, print out
    if sample_text:
        print sample_text
        print time_taken
    return

my_read('MyText.txt')


By testing for both, you avoid having to use f.seek(0) and start looping through the file again. Of course, this is based on the sample input above - and assumes that there isn't multiple lines with 'Time taken' or 'Sample Text' in them. 

Hope this helps