def get_contacts(filename):
    """
    Return two lists names, emails containing names and email addresses
    read from a file specified by filename.
    """

    names = []
    emails = []
    lineofdata = []
    # print(names)
    # print(emails)
    with open(filename, mode='r', encoding='utf-8') as contacts_file:
        for a_contact in contacts_file:
#            print(a_contact)
            lineofdata = a_contact.split()
#            print(lineofdata)
#            print(len(lineofdata))
#            print(lineofdata[0])
#            print(lineofdata[1])
            names.append(lineofdata[0])
            emails.append(lineofdata[1])
#            print("names are ", names)
#            print(emails)
    return names, emails