import url #https://www.cs.virginia.edu/~cs1112/text/hidden.txt reply = input("Give me a url: ") reply = reply.strip() website_text = url.get_text( reply ) website_list = website_text.split( '\n' ) # .split() when called on a string normally splits on spaces but # when you give it an argument (in this case '\n') it will separate the string into list elements separated at # the newline character (at each new line) print( website_list ) first_occurence = website_text.find('a') print( first_occurence ) first_occurence_list = website_list.index('a') # this will return an error saying that 'a' is not in list since there is no #specific element 'a' in our list print ( first_occurence_list )