import random


def select_account_pair(accounts):
    """Selects a pair of accounts at random from accounts ensuring they are not
    the same."""
    while True:
        from_acc = random.choice(accounts)
        to_acc = random.choice(accounts)
        if from_acc != to_acc:
            return from_acc, to_acc