def searchAccount(searchTerm, book):
    """Searches through account names"""
    print("Search results:\n")

    found = False

    # search
    for account in book.accounts:
        # print(account.fullname)
        # name
        if searchTerm.lower() in account.fullname.lower():
            print(account.fullname)
            found = True

    if not found:
        print("Search term not found in account names.")
def searchAccount ( searchTerm , book ) : print ( "Search results:\n" ) found = False for account in book . accounts : if searchTerm . lower ( ) in account . fullname . lower ( ) : print ( account . fullname ) found = True if not found : print ( "Search term not found in account names." )
Searches through account names