def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp

def find_position_of_smallest(a, i):
    x = i
    y = i + 1
    while y < len(a):
        if a[y] < a[x]:
            x = y
        y = y + 1
    return x

def sort(a):
    i = 0
    while i < len(a):
        x = find_position_of_smallest(a, i)
        swap(a, i, x)
        i = i + 1
    return x

assert sort([0])==None and sort([0])==None and sort([])==None and sort([])==None and sort([' '])==None and sort([' '])==None and sort([70, 339305549])==None and sort([70, 339305549])==None

Repeatedly move minimimum of remaining sublist to front.


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp

def find_position_of_smallest(a, i):
    y = 1
    while y < len(a):
        y = y + 1
    return y

def sort(a):
    i = 0
    while i < len(a):
        y = find_position_of_smallest(a, i)
        swap(a, i, y)
        i = i + 1
    return x


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp

def find_position_of_smallest(a, i):
    s = i
    while y < len(a):
        if a[i] < a[s]:
            s = i
        i = i + 1
    return s

def sort(a):
    i = 0
    while i < len(a):
        s = find_position_of_smallest(a, i)
        swap(a, i, s)
        i = i + 1
    return s


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp

def find_position_of_smallest(a, i):
    s = i
    while i < len(a):
        if a[i] < a[s]:
            s = i
        i = i + 1
    return s

def sort(a):
    i = 0
    while i < len(a):
        s = find_position_of_smallest(a, i)
        swap(a, i, s)
        i = i + 1
    return s


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp

def find_position_of_smallest(a, i):
    p = i
    while i < len(a):
        if a[i] < a[p]:
            p = i
        i = i + 1
    return p

def sort(a):
    i = 0
    while i < len(a):
        p = find_position_of_smallest(a, i)
        swap(a, i, p)
        i += 1


def sort(a):
    i = 0
    while i < len(a):
        p = i
        j = i + 1
        while j < len(a):
            if a[j] < a[p]:
                p = j
            j = j + 1
        tmp = a[i]
        a[i] = a[j]
        a[j] = tmp
        i = i + 1


def sort(a):
    i = 0
    while i < len(a):
        p = i
        j = i + 1
        while j < len(a):
            if a[j] < a[p]:
                p = j
            j = j + 1
        tmp = a[p]
        a[p] = a[i]
        a[i] = tmp
        i = i + 1


def swap(a, i, j):
    tmp = a[j]
    a[j] = a[i]
    a[i] = tmp

def find_position_of_smallest(a, i):
    p = i
    j = i + 1
    while j < len(a):
        if a[j] < a[p]:
            p = j
        j = j + 1
    return p

def sort(a):
    i = 0
    while i < len(a):
        p = find_position_of_smallest(a, i)
        swap(a, i, p)
        i = i + 1


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp

def find_position_of_smallest(a, i):
    s = i
    while i < len(a):
        if a[i] < a[s]:
            s = i
        i = i + 1
    return s

def sort(a):
    i = 0
    while i < len(s):
        x = find_position_of_smallest(a, i)
        swap(a, i, x)
    return x


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp

def find_position_of_smallest(a, i):
    s = i
    while i < len(a):
        if a[i] < a[s]:
            s = i
        i = i + 1
    return s

def sort(a):
    i = 0
    while i < len(a):
        x = find_position_of_smallest(a, i)
        swap(a, i, x)
    return x


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp

def find_position_of_smallest(a, i):
    s = i
    while i < len(a):
        if a[i] < a[s]:
            s = i
        i = i + 1
    return s

def sort(a):
    i = 0
    while i < len(a):
        x = find_position_of_smallest(a, i)
        swap(a, i, x)
        i = i + 1
    return x


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp

def find_position_of_smallest(a, i):
    s = i
    while i < len(a):
        if a[i] < a[s]:
            i = s
        i = i + 1
    return s

def sort(a):
    i = 0
    while i < len(a):
        x = find_position_of_smallest(a, i)
        swap(a, i, x)
        i = i + 1
    return x


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp

def find_position_of_smallest(a, i):
    s = i
    while i < len(a):
        if a[i] < a[s]:
            i = s
        i = i + 1
        return s

def sort(a):
    i = 0
    while i < len(a):
        x = find_position_of_smallest(a, i)
        swap(a, i, x)
        i = i + 1
        return x


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp

def find_position_of_smallest(a, i):
    s = i
    while i < len(a):
        if a[i] < a[s]:
            s = i
        i = i + 1
        return s

def sort(a):
    i = 0
    while i < len(a):
        x = find_position_of_smallest(a, i)
        swap(a, i, x)
        i = i + 1
        return x


def sort(a):
    i = 0
    while i < len(a):
        p = i
        j = i + 1
        while i < len(a):
            if a[j] < a[p]:
                p = j
            j = j + 1
        tmp = a[p]
        a[p] = a[i]
        a[i] = tmp
        i = i + 1


def swap(a, i, j):
    temp = a[i]
    a[i] = a[j]
    a[j] = temp

def find_position_of_smallest(a, i):
    tempnum = i
    while i != len(a):
        if a[i] < a[tempnum]:
            tempnum = i
        i = i + 1
    return tempnum

def sort(a):
    i = 0
    j = 0
    while i != len(a):
        j = find_position_of_smallest(a, i)
        swap(a, i, j)
        i = i + 1


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp

def find_position_of_smallest(a, i):
    p = i
    j = i + 1
    while j < len(a):
        if a[j] < a[p]:
            p = j
        j = j + 1
    return p

def sort(a):
    i = 0
    while i < len(a):
        p = find_position_of_smallest(a, i)
        swap(a, p, i)
        i = i + 1


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp

def sort(a):
    i = 0
    while i < len(a):
        p = find_position_of_smallest
        swap(a, i, p)
    i = i + 1


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp

def sort(a):
    i = 0
    while i < len(a):
        p = find_position_of_smallest
        swap(a, i, p)
    i += 1


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp

def sort(a):
    i = 0
    while i < len(a):
        p = find_position_of_smallest
        swap(a, i, p)
        i += 1


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp

def sort(a):
    while i < len(a):
        p = find_position_of_smallest
        swap(a, i, j)
        i = i + 1


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp

def sort(a):
    while i < len(a):
        p = find_position_of_smallest
        swap(a, i, j)
        i += 1


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp

def find_position_of_smallest(a, i):
    p = i
    while i < len(a):
        if a[i] < a[p]:
            p = i
        i = i + 1
    return p

def sort(a):
    i = 0
    while i < len(a):
        p = find_position_of_smallest(a, i)
        swap(a, i, j)
        i = i + 1


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp

def find_position_of_smallest(a, i):
    p = i
    while i < len(a):
        if a[i] < a[p]:
            p = i
        i = i + 1
    return p

def sort(a):
    i = 0
    while i < len(a):
        p = find_position_of_smallest(a, i)
        swap(a, i, p)
        i = i + 1


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp

def find_position_of_smallest(a, i):
    p = i
    j = i + 1
    while j < len(a):
        if a[j] < a[p]:
            p = j
        j += 1
    return p

def sort(a):
    i = 0
    while i < len(a):
        smallest = find_position_of_smallest(a, i)
        swap(a, i, smallest)
        i += 1
    return a


def reverse(a):
    rev = []
    i = 0
    while i < len(a):
        rev.append(a[len(a) - i])
        i = i + 1
    print(rev)

Reverse a list of elements.


def reverse(a):
    rev = []
    i = 0
    while i < len(a):
        rev.append(a[len(a) - i])
        i = i + 1
    print(rev.rstrip())

Reverse a list of elements.


def reverse(a):
    rev = []
    i = 0
    while i < len(a):
        rev.append(a[len(a) - i])
        i = i + 1
    print(rev.strip())

Reverse a list of elements.


Reverse a list of elements.


def reverse(a):
    rev = []
    i = 0
    while i < len(a):
        rev.append(a[len(a) - i])
        i = i + 1
    return rev

Reverse a list of elements.


def reverse(a):
    i = 0
    while i < len(a):
        print(a[len(a) - i - 1])
        i = i + 1

Reverse a list of elements.


def reverse(a):
    i = 0
    rev = []
    while i < len(a):
        rev.append(a[len(a) - i - 1])
        i = i + 1
    return rev

Reverse a list of elements.


def reverse(a):
    rev = []
    for i in len(a):
        rev.append(a[len(a) - i - 1])
    return rev

Reverse a list of elements.


def reverse(a):
    rev = []
    i = 0
    for i in len(a):
        rev.append(a[len(a) - i - 1])
    return rev

Reverse a list of elements.


def reverse(a):
    rev = []
    i = 0
    while i < len(a):
        rev.append(a[len(a) - i - 1])
        i = i + 1
    return rev

Reverse a list of elements.


def reverse(string):
    results = string[::-1]
    return string[::-1]

Reverse a list of elements.


def union(a, b):
    da = {}
    db = {}
    i = 0
    while i < len(a):
        da[a[i]] = True
        i = i + 1
    i = 0
    while i < len(b):
        db[b[i]] = True
        i = i + 1
    c = []
    for key in da:
        c.append(key)
    for key in db:
        if key not in da:
            c.append(key)
    return c

Merge two lists into a single one.


def intersection(a, b):
    da = {}
    db = {}
    i = 0
    while i < len(a):
        da[a[i]] = True
        i = i + 1
    i = 0
    while i < len(b):
        db[b[i]] = True
        i = i + 1
    c = []
    for key in da:
        if key in db:
            c.append(key)
    return c

Return the elements which are in both lists.


Merge two lists into a single one.


def union(a, b):
    un = a + b
    return un

Merge two lists into a single one.


def union(a, b):
    c = []
    i = 0
    while i < len(a):
        c.append(a[i])
        i = i + 1
    j = 0
    while j < len(b):
        if b[i] not in a:
            c.append(b[i])
    return c

Merge two lists into a single one.


def intersection():
    c = []
    while i < len(a):
        if a[i] in b:
            c.append(a[i])
        i = i + 1
    return c


def union(a, b):
    union = a + b
    return union

Merge two lists into a single one.


def union(a, b):
    c = []
    i = 0
    while i < len(a):
        c.append(a[i])
        i = i + 1
    k = 0
    while k < len(b):
        if not b[k] in a:
            c.append(b[k])
        k = k + 1
    return c

Merge two lists into a single one.


def intersection(a, b):
    c = []
    while i < len(a):
        if a[i] in b:
            c.append(a[i])
        i = i + 1
    return c


def intersection(a, b):
    c = []
    i = 0
    while i < len(a):
        if a[i] in b:
            c.append(a[i])
        i = i + 1
    return c


def union(a, b):
    i = 0
    while i < len(a) and a[i] != v:
        i = i + 1
    return i < len(a)

Merge two lists into a single one.


def union(a, b):
    i = 0
    while i < len(a) and a[i] != b:
        i = i + 1
    return i < len(a)

Merge two lists into a single one.


def intersection(a, b):
    seen = {}
    i = 0
    while i < len(a):
        if a[i] in b and not a[i] in seen:
            seen[a[i]] = True
        i = i + 1
    return c


def union(a, b):
    seen = {}
    i = 0
    while i < len(a):
        seen[a[i]] = True
        i = i + 1
    k = 0
    while k < len(b):
        if not b[k] in seen:
            seen[b[k]] = True
        k = k + 1
    return seen

Merge two lists into a single one.


def intersection(a, b):
    seen = {}
    i = 0
    while i < len(a):
        if a[i] in b and not a[i] in seen:
            seen[a[i]] = True
        i = i + 1
    return seen


def union(a, b):
    union = a + b
    return sorted(sets.union(a, b))

Merge two lists into a single one.


def intersection(a, b):
    un = a + b
    return un


def union(a, b):
    i = 0
    while i < len(a):
        c = a.append(b[i])
        i = i + 1
    return c

Merge two lists into a single one.


def union(a, b):
    i = 0
    while i < len(lines):
        if lines[i] not in seen:
            sys.stdout.write(lines[i])
            seen[lines[i]] = True
        i = i + 1

Merge two lists into a single one.


def union(a, b):
    i = 0
    while i < len(a):
        if a[i] not in seen:
            sys.stdout.write(a[i])
            seen[a[i]] = True
        i = i + 1

Merge two lists into a single one.


def union(a, b):
    a = []
    b = []
    return c

Merge two lists into a single one.


def union(a, b):
    a = []
    b = []
    return result

Merge two lists into a single one.


def union(a, b):
    a = []
    b = []
    return a, b

Merge two lists into a single one.


Merge two lists into a single one.


def sort(a):
    i = 0
    while i < len(a):
        p = i
        j = i + 1
        while i < len(a):
            if a[j] < a[p]:
                p = j
            j = j + 1
        tmp = a[p]
        a[p] = a[i]
        a[i] = tmp
        i = i + 1


def union(a, b):
    i = 0
    c = {}
    while i < len(a):
        c.append(a[i])
        if b[i] not in c:
            c.append(b[i])
        i = i + 1
    return c

Merge two lists into a single one.


def union(a, b):
    i = 0
    while i < len(a + b):
        if a[i] not in seena:
            sys.stdout.write(a[i])
            seen[a[i]] = True
        elif b[i] not in seenb:
            sys.stdout.wrtie(b[i])
            seen[b[i]] = True
        i = i + 1

Merge two lists into a single one.


def sort(a):
    i = 0
    while i < len(a):
        p = i
        j = i + 1
        while i < len(j):
            if a[j] < a[p]:
                p = j
            j = j + 1
        tmp = a[p]
        a[p] = a[i]
        a[i] = tmp
        i = i + 1


def union(a, b):
    i = 0
    c = []
    while i < len(a):
        c.append(a[i])
        if b[i] not in c:
            c.append(b[i])
        i = i + 1
    return c

Merge two lists into a single one.


def sort(a):
    i = 0
    while i < len(a):
        p = i
        j = i + 1
        while j < len(j):
            if a[j] < a[p]:
                p = j
            j = j + 1
        tmp = a[p]
        a[p] = a[i]
        a[i] = tmp
        i = i + 1


def union(a, b):
    d = {}
    i = 0
    while i < len(lines):
        d = {a, b}
    return d

Merge two lists into a single one.


def sort(a):
    i = 0
    while i < len(a):
        p = i
        j = i + 1
        while j < len(a):
            if a[j] < a[p]:
                p = j
            j = j + 1
        tmp = a[p]
        a[p] = a[i]
        a[i] = tmp
        i = i + 1


def union(a, b):
    i = 0
    while i < len(a + b):
        if a[i] not in seena:
            c.append(a[i])
        elif b[i] not in seenb:
            c.append(a[i])
        i = i + 1
    print(c)

Merge two lists into a single one.


def union(a, b):
    i = 0
    c = []
    while i < len(a):
        if b[i] not in c:
            c.append(b[i])
        elif a[i] not in c:
            c.append(a[i])
        i = i + 1
    return c

Merge two lists into a single one.


def union(a, b):
    c = a + b
    return c

Merge two lists into a single one.


def union(a, b):
    i = 0
    while i < len(a):
        c.append(a[i])
        i = i + 1
    p = 0
    while p < len(b):
        if b[p] not in c:
            c.append(b[p])
        p = p + 1
    return c

Merge two lists into a single one.


def intersection(a, b):
    i = 0
    while i < len(a):
        if a[i] in b:
            d.append(a[i])
        i = i + 1
    return d


def union(a, b, c):
    i = 0
    while i < len(a):
        c.append(a[i])
        i = i + 1
    p = 0
    while p < len(b):
        if b[p] not in c:
            c.append(b[p])
        p = p + 1
    return c

Merge two lists into a single one.


def intersection(a, b, d):
    i = 0
    while i < len(a):
        if a[i] in b:
            d.append(a[i])
        i = i + 1
    return d


def intersection(a, b):
    d = []
    i = 0
    while i < len(a):
        if a[i] in b:
            d.append(a[i])
        i = i + 1
    return d


def union(a, b):
    c = []
    i = 0
    while i < len(a):
        c.append(a[i])
        i = i + 1
    p = 0
    while p < len(b):
        if b[p] not in c:
            c.append(b[p])
        p = p + 1
    return c

Merge two lists into a single one.


def union(a, b):
    i = 0
    c = []
    while i < len(a):
        if a[i] not in c:
            c.append(a[i])
        elif c[i] not in c:
            c.append(c[i])
        i = i + 1
    return c

Merge two lists into a single one.


def union(a, b):
    i = 0
    c = []
    while i < len(c):
        if a[i] not in c:
            c.append(a[i])
        elif c[i] not in c:
            c.append(c[i])
        i = i + 1
    return c

Merge two lists into a single one.


def union(a, b):
    c = a, b
    return c

Merge two lists into a single one.


def intersection(a, b):
    d = a + b
    return d


def union(a, b):
    result = a + b
    return result

Merge two lists into a single one.


def union(a, b):
    i = 0
    c = []
    while i < len(a) and i < len(c):
        if a[i] not in c:
            c.append(a[i])
        elif c[i] not in c:
            c.append(c[i])
        i = i + 1
    return c

Merge two lists into a single one.


def union(a, b):
    c = []
    i = 0
    while i < len(a):
        c.append(a[i])
        i = i + 1
    p = 0
    while p < len(b):
        if b[p] not in a:
            c.append(b[p])
        p = p + 1
    return c

Merge two lists into a single one.


def union(a, b):
    i = 0
    c = []
    while i < 6:
        if a[i] not in c:
            c.append(a[i])
        elif c[i] not in c:
            c.append(c[i])
        i = i + 1
    return c

Merge two lists into a single one.


Merge two lists into a single one.


def union(a, b):
    i = 0
    c = []
    while i < len(a) + len(b):
        if a[i] not in c:
            c.append(a[i])
        elif c[i] not in c:
            c.append(c[i])
        i = i + 1
    return c

Merge two lists into a single one.


def union(a, b):
    c = a or b
    return c

Merge two lists into a single one.


def union(a, b):
    result = a + b
    i = 0
    while i < len(a) and a[i] == s:
        i = i + 1
    return result

Merge two lists into a single one.


def union(a, b):
    result = a + b
    s = []
    i = 0
    while i < len(a) and a[i] == s:
        i = i + 1
    return result

Merge two lists into a single one.


def union(a, b):
    c = []
    i = 0
    while i < len(a):
        if a[i] not in c:
            c.append(a[i])
        i = i + 1
    p = 0
    while p < len(b):
        if b[p] not in c:
            c.append(b[p])
        p = p + 1
    return c

Merge two lists into a single one.


def intersection(a, b):
    d = a and b
    return d


def union(a, b):
    result = a + b
    s = []
    i = 0
    while i < len(a) and a[i] == s:
        i = i + 1
    if i == len(s):
        s.append(line)
    return result

Merge two lists into a single one.


def union(a, b):
    result = a + b
    s = []
    i = 0
    while i < len(a) and a[i] == s:
        i = i + 1
    if i == len(s):
        s.append(result[i])
    return result

Merge two lists into a single one.


def union(a, b):
    i = 0
    c = []
    while i < len(6):
        if a[i] not in c:
            c.append(a[i])
        elif c[i] not in c:
            c.append(c[i])
        i = i + 1
    return c

Merge two lists into a single one.


def intersection(a, b):
    d = []
    i = 0
    while i < len(a):
        if a[i] in b and a[i] not in d:
            d.append(a[i])
        i = i + 1
    return d


def union(a, b):
    seen = {}
    i = 0
    while i < len(a):
        sys.stdout.write(a[i])
        seen[a[i]] = True
        i = i + 1
    i = 0
    while i < len(seen):
        if b[i] not in seen:
            sys.stdout.write(b[i])
            seen[b[i]] = True
            i = i + 1
    for list in seen:
        print(list)
    if __name__ == '__main__':
        print(union([1, 2, 3], [3, 4, 5]))

Merge two lists into a single one.


def intersection(a, b):
    i = 0
    while i < len(a):
        c.append(a[i])
        i = i + 1
    p = 0
    while p < len(b):
        if b[p] in c:
            d.append(b[p])
        p = p + 1
    return d


def union(a, b):
    i = 0
    c = []
    while i < len(a):
        if a[i] not in c:
            c.append(a[i])
        elif c[i] not in c:
            c.append(c[i])
        i = i + 1
    return c

Merge two lists into a single one.


def union(a, b):
    result = a + b
    s = []
    i = 0
    line = sys.stdin.readline()
    while 0 < len(line):
        while i < len(a) and s[i] != line:
            i = i + 1
        if i == len(s):
            s.append(line)
    return result

Merge two lists into a single one.


def intersection(a, b):
    return a or b


def union(a, b):
    result = a + b
    s = []
    i = 0
    line = results[i]
    while 0 < len(line):
        while i < len(a) and s[i] != line:
            i = i + 1
        if i == len(s):
            s.append(line)
    return result

Merge two lists into a single one.


Merge two lists into a single one.


def union(a, b):
    result = a + b
    s = []
    i = 0
    line = result[i]
    while 0 < len(line):
        while i < len(a) and s[i] != line:
            i = i + 1
        if i == len(s):
            s.append(line)
    return result

Merge two lists into a single one.


def union(a, b):
    i = 0
    while i < len(a):
        c.appened(a[i])
        i = i + 1
    p = 0
    while p < len(b):
        if b[p] not in a:
            c.append(b[p])
            p = p + 1
    return c

Merge two lists into a single one.


def intersection(a, b):
    d = []
    i = 0
    while i < len(a):
        if a[i] in b and a[i] not in d:
            d.append(a[i])
            i = i + 1
            return d


def union(a, b):
    i = 0
    d = {}
    while i < len(a):
        d[a[i]] = True
        i = i + 1
        print(d)

Merge two lists into a single one.


def union(a, b):
    result = a + b
    s = []
    i = 0
    line = result[i]
    while 0 < len(line):
        while i < len(a) and s[i] != line:
            i = i + 1
        if i == len(s):
            s.append(line)
    return line.rstrip()

Merge two lists into a single one.


def union(a, b):
    c = []
    i = 0
    while i < len(a):
        c.appened(a[i])
        i = i + 1
    p = 0
    while p < len(b):
        if b[p] not in a:
            c.append(b[p])
            p = p + 1
    return c

Merge two lists into a single one.


def union(a, b):
    c = []
    i = 0
    while i < len(a):
        c.append(a[i])
        i = i + 1
    p = 0
    while p < len(b):
        if b[p] not in a:
            c.append(b[p])
            p = p + 1
    return c

Merge two lists into a single one.


def union(a, b):
    result = a + b
    s = []
    i = 0
    line = result[i]
    while 0 < line:
        while i < len(a) and s[i] != line:
            i = i + 1
        if i == len(s):
            s.append(line)
    return line.rstrip()

Merge two lists into a single one.


def union(a, b):
    result = a + b
    s = []
    i = 0
    line = result[i]
    while 0 < line:
        while i < a and s[i] != line:
            i = i + 1
        if i == len(s):
            s.append(line)
    return line.rstrip()

Merge two lists into a single one.


def intersection(a, b):
    c = {}
    i = 0
    while i < len(a):
        if a[i] in b and not a[i] in c:
            c[a[i]] = True
        i = i + 1
    return c


def union(a, b):
    c = {}
    i = 0
    while i < len(a):
        c[a[i]] = True
    i = i + 1
    k = 0
    while k < len(b):
        if not b[k] in c:
            c[b[k]] = True
        k = k + 1
    return c

Merge two lists into a single one.


def intersection(a, b):
    d = []
    i = 0
    while i < len(a):
        if a[i] in b and a[i] not in d:
            d.append(a[i])
            i = i + 1
    return d


def union(a, b):
    x = a + b
    while 0 < len(x):
        i = 0
        while i < len(x) and x[i] != x:
            i = i + 1
    if i == len(x):
        d[x[i]] = True
    print(union([1, 2, 3], [3, 4, 5]))

Merge two lists into a single one.


def union(a, b):
    result = a + b
    s = []
    i = 0
    line = result[i]
    while i < len(a):
        seen[a[i]] = True
        while i < a and s[i] != line:
            i = i + 1
        if i == len(s):
            s.append(line)
    return

Merge two lists into a single one.


def union(a, b):
    result = a + b
    s = []
    i = 0
    line = result[i]
    while i < len(a):
        s[a[i]] = True
        while i < a and s[i] != line:
            i = i + 1
        if i == len(s):
            s.append(line)
    return

Merge two lists into a single one.


def union(a, b):
    seen = {}
    i = 0
    while i < len(a):
        sys.stdout.write(a[i])
        seen[a[i]] = True
        i = i + 1
    i = 0
    while i < len(seen):
        if b[i] not in seen:
            sys.stdout.write(b[i])
            seen[b[i]] = True
            i = i + 1
            print(seen)
    if __name__ == '__main__':
        print(union([1, 2, 3], [3, 4, 5]))

Merge two lists into a single one.


def union(a, b):
    x = a + b
    while 0 < len(x):
        i = 0
        while i < len(x) and x[i] != x:
            i = i + 1
        if i == len(x):
            d[x[i]] = True
    print(union([1, 2, 3], [3, 4, 5]))

Merge two lists into a single one.


Merge two lists into a single one.


def union(a, b):
    c = []
    i = 0
    while i < len(a):
        if a[i] not in c:
            c.append(a[i])
            i = i + 1
    p = 0
    while p < len(b):
        if b[p] not in c:
            c.append(b[p])
            p = p + 1
    return c

Merge two lists into a single one.


def intersection(a, b):
    seen = {}
    i = 0
    while i < len(a):
        if a[i] in b and not a[i] in seen:
            seen[a[i]] = True
        i = i + 1
    return seen


def union(a, b):
    seen = {}
    i = 0
    while i < len(a):
        seen[a[i]] = True
    i = i + 1
    k = 0
    while k < len(b):
        if not b[k] in seen:
            seen[b[k]] = True
        k = k + 1
    return seen

Merge two lists into a single one.


def union(a, b):
    seen = {}
    i = 0
    while i < len(a):
        seen[a[i]] = True
        i = i + 1
    k = 0
    while k < len(b):
        if not b[k] in seen:
            seen[b[k]] = True
        k = k + 1
    return seen

Merge two lists into a single one.


def union(a, b):
    result = a + b
    s = []
    i = 0
    while i < len(a):
        s[a[i]] = True
        i = i + 1
    return

Merge two lists into a single one.


def union(a, b):
    seen = {}
    i = 0
    while i < len(a):
        seen[a[i]] = True
        i = i + 1
    j = 0
    while j < len(b):
        if not b[j] in seen:
            seen[b[j]] = True
        j = j + 1
        return seen

Merge two lists into a single one.


def union(a, b):
    i = 0
    d = {}
    while i < len(a):
        d[a[i]] = True
        i = i + 1
        k = 0
        while k < len(b):
            if b[k] not in d:
                d[b[k]] = True
            k = k + 1
        return d

Merge two lists into a single one.


def union(a, b):
    result = a + b
    s = []
    i = 0
    while i < len(a):
        s[a[i]] = True
        i = i + 1
    if a[i] in s:
        s.append()
    return

Merge two lists into a single one.


def union(a, b):
    c = {}
    i = 0
    while i < len(a):
        sys.stdout.write(a[i])
        c[a[i]] = True
        i = i + 1
    i = 0
    while i < len(seen):
        if b[i] not in seen:
            sys.stdout.write(b[i])
            c[b[i]] = True
            i = i + 1
            print(c)
    if __name__ == '__main__':
        print(union([1, 2, 3], [3, 4, 5]))

Merge two lists into a single one.


def union(a, b):
    ab = a + b
    c = []
    for i in ab:
        if i not in c:
            c.append(i)
    return c

Merge two lists into a single one.


def union(a, b):
    i = 0
    d = {}
    while i < len(a):
        d[a[i]] = True
        i = i + 1
        k = 0
        while k < len(b):
            if not b[k] in d:
                d[b[k]] = True
            k = k + 1
        return d

Merge two lists into a single one.


def union(a, b):
    da = {}
    db = {}
    i = 0
    while i < len(a):
        da[a[i]] = True
        i = i + 1
    i = 0
    while i < len(b):
        db[b[i]] = True
        i = i + 1
    c = []
    for key in da:
        c.append(key)
    for key in db:
        if key not in da:
            c.append(key)
    return c

Merge two lists into a single one.


def intersection(a, b):
    da = {}
    db = {}
    i = 0
    while i < len(a):
        da[a[i]] = True
        i = i + 1
    i = 0
    while i < len(b):
        db[b[i]] = True
        i = i + 1
    c = []
    for key in da:
        if key in db:
            c.append(key)
    return c


def intersection(a, b):
    seen = {}
    i = 0
    while i < len(b):
        if a[i] in b and not a[i] in seen:
            seen[a[i]] = True
        i = i + 1
    return seen


def union(x, y):
    answer = []
    check = {}
    i = 0
    while i < len(x):
        if not x[i] in check:
            answer.append(x[i])
            check.append(x[i])
        i = i + 1
    j = 0
    while i < len(y):
        if not y[j] in check:
            answer.append(y[j])
            check.append(y[j])
        j = j + 1

Merge two lists into a single one.


def union(x, y):
    answer = []
    check = {}
    i = 0
    while i < len(x):
        if not x[i] in check:
            answer.append(x[i])
            check.append(x[i])
        i = i + 1
    j = 0
    while i < len(y):
        if not y[j] in check:
            answer.append(y[j])
            check.append(y[j])
        j = j + 1
    return answer

Merge two lists into a single one.


def union(a, b):
    s = a + b
    return set(s)

Merge two lists into a single one.


def union(a, b):
    seen = {}
    i = 0
    while i < len(a):
        seen[a[i]] = True
        i = i + 1
    j = 0
    while k < len(b):
        if not b[k] in seen:
            seen[b[k]] = True
        k = k + 1
        return seen

Merge two lists into a single one.


def union(a, b):
    seen = {}
    i = 0
    while i < len(a):
        seen[a[i]] = True
        i = i + 1
    k = 0
    while k < len(b):
        if not b[k] in seen:
            seen[b[k]] = True
        k = k + 1
        return seen

Merge two lists into a single one.


def intersection(a, b):
    seen = {}
    i = 0
    while i < len(a):
        if a[i] in b and not a[i] in seen:
            seen[a[i]] = True
        i = i + 1
    return seen


def union(a, b):
    seen = {}
    i = 0
    while i < len(a):
        seen[a[i]] = True
        i = i + 1
    k = 0
    while k < len(b):
        if not b[k] in seen:
            seen[b[k]] = True
        k = k + 1
    return seen

Merge two lists into a single one.


def union(a, b):
    seen = {}
    i = 0
    while i < len(a):
        if a[i] not in seen:
            seen[a[i]] = True
        i = i + 1
    j = 0
    while j < len(b):
        if b[j] not in seen:
            seen[b[j]] = True
        j = j + 1
    return seen

Merge two lists into a single one.


def union(a, b):
    seen = {}
    i = 0
    while i < len(a):
        seen[a[i]] = True
        i = i + 1
    j = 0
    while k < len(b):
        if not b[j] in seen:
            seen[b[j]] = True
        j = j + 1
    return seen

Merge two lists into a single one.


def union(a, b):
    a not in b
    c = a + b
    return c

Merge two lists into a single one.


def union(a, b):
    i = 0
    dic = {}
    while i < len(a):
        dic[a[i]] = True
        i = i + 1
        k = 0
        while k < len(b):
            if not b[k] in dic:
                dic[b[k]] = True
            k = k + 1
        return dic

Merge two lists into a single one.


def union(a, b):
    seen = {}
    i = 0
    while i < len(a):
        seen[a[i]] = True
        i = i + 1
    j = 0
    while j < len(b):
        if not b[j] in seen:
            seen[b[j]] = True
        j = j + 1
    return seen

Merge two lists into a single one.


def union(a, b):
    i = 0
    c = []
    while i < len(a):
        if a[i] not in c:
            c.append(a[i])
        elif c[i] not in c:
            c.append(c[i])
        i = i + 1
    return c

Merge two lists into a single one.


def union(a, b):
    i = 0
    dic = {}
    while i < len(a):
        dic[a[i]] = True
        i = i + 1
        j = 0
        while j < len(b):
            if not b[j] in dic:
                dic[b[j]] = True
            j = j + 1
        return dic

Merge two lists into a single one.


def union(a, b):
    c = a + b
    return c

Merge two lists into a single one.


def union(x, y):
    answer = []
    check = {}
    i = 0
    while i < len(x):
        if not x[i] in check:
            answer.append(x[i])
            check[x[i]] = True
        i = i + 1
    j = 0
    while i < len(y):
        if not y[j] in check:
            answer.append(y[j])
            check[y[j]] = True
        j = j + 1
    return answer

Merge two lists into a single one.


def union(a, b):
    c = []
    i = 0
    while i < len(a):
        if a[i] not in c:
            c.append(a[i])
        i = i + 1
    p = 0
    while p < len(b):
        if b[p] not in c:
            c.append(b[p])
        p = p + 1
    return c

Merge two lists into a single one.


def intersection(a, b):
    d = []
    i = 0
    while i < len(a):
        if a[i] in b and a[i] not in d:
            d.append(a[i])
        i = i + 1
    return d


Merge two lists into a single one.


def intersection(a, b):
    i = 0
    s = []
    while i < len(a) and i < len(b):
        if a[i] in b:
            s.append(a[i])
        i = i + 1
    return s


def union(a, b):
    s = a + b
    return set(s)

Merge two lists into a single one.


def union(a, b):
    return list(set(a) | set(b))

Merge two lists into a single one.


def intersection(a, b):
    return list(set(a) & set(b))


def intersection(a, b):
    i = 0
    s = []
    while i < len(a) and i < len(b):
        if int(a[i]) in b:
            s.append(a[i])
        i = i + 1
    return s


def union(a, b):
    c = {}
    i = 0
    while i < len(a):
        c[a[i]] = True
        i = i + 1
    i = 0
    while i < len(seen):
        if b[i] not in seen:
            c[b[i]] = True
            i = i + 1
    return c

Merge two lists into a single one.


def intersection(a, b):
    i = 0
    s = []
    while i < len(a) and i < len(b):
        if a[i] in b:
            s.append(a[i])
        i = i + 1
    return set(s)


def union(a, b):
    A = 'end'
    i = ''
    c = []
    while i != A:
        if a[i] not in c:
            c.append(a[i])
        elif c[i] not in c:
            c.append(c[i])
        else:
            i = A
    return c

Merge two lists into a single one.


def intersection(a, b):
    d = a - b
    return d


def intersection(a, b):
    seen = {}
    i = 0
    while i < len(a):
        if a[i] in b and not a[i] in seen:
            seen[a[i]] = True
        i = i + 1
    return seen


def union(a, b):
    seen = {}
    i = 0
    while i < len(a):
        seen[a[i]] = TRue
        i = i + 1
    k = 0
    while i < len(b):
        if not b[k] in seen:
            seen[b[k]] = True
        k = k + 1
    return seen

Merge two lists into a single one.


def union(a, b):
    seen = {}
    i = 0
    while i < len(a):
        seen[a[i]] = True
        i = i + 1
    k = 0
    while i < len(b):
        if not b[k] in seen:
            seen[b[k]] = True
        k = k + 1
    return seen

Merge two lists into a single one.


def union(a, b):
    seen = {}
    i = 0
    while i < len(a):
        seen[a[i]] = True
        i = i + 1
    k = 0
    while k < len(b):
        if not b[k] in seen:
            seen[b[k]] = True
        k = k + 1
    return seen

Merge two lists into a single one.


def intersection(a, b):
    int_seen = {}
    k = 0
    while k < len(a):
        if a[k] in b:
            int_seen[a[k]] = True
    k = k + 1
    return int_seen


def union(a, b):
    seen = {}
    i = 0
    while i < len(a):
        if a[i] not in seen:
            seen[a[i]] = True
        i = i + 1
    j = 0
    while j < len(b):
        if b[j] not in seen:
            seen[b[j]] = True
        j = j + 1
    return seen

Merge two lists into a single one.


def union(a, b):
    i = 0
    seen = []
    while i < len(a):
        seen[a[i]] = True
        i = i + 1
        k = 0
        while k < len(b):
            if not b[k] in b:
                seen[b[k]] = True
            k = k + 1
        return seen

Merge two lists into a single one.


def union(a, b):
    seen = []
    i = 0
    while i < len(a):
        seen[a[i]] = True
        i = i + 1
    j = 0
    while j < len(b):
        if not b[k] in b:
            seen[b[k]] = True
        j = j + 1
    return seen

Merge two lists into a single one.


def union(a, b):
    c = a + b
    return c

Merge two lists into a single one.


def union(a, b):
    seen = {}
    c = []
    i = 0
    while i < len(a):
        seen[a[i]] = True
        i = i + 1
    i = 0
    while i < len(seen):
        if b[i] not in seen:
            seen[b[i]] = True
            i = i + 1
    for c in seen:
        return c

Merge two lists into a single one.


def union(a, b):
    i = 0
    dic = {}
    while i < len(a):
        dic[a[i]] = True
        i = i + 1
        j = 0
        while j < len(b):
            if not b[j] in dic:
                dic[b[j]] = True
            j = j + 1
        return dic

Merge two lists into a single one.


def intersection(a, b):
    int_seen = {}
    leng = len(a)
    k = 0
    while k < leng:
        if a[k] in b:
            int_seen[a[k]] = True
    k = k + 1
    return int_seen


def union(a, b):
    s = a + b
    return set(s)

Merge two lists into a single one.


Merge two lists into a single one.


def intersection(a, b):
    i = 0
    s = []
    while i < len(a) and i < len(b):
        if a[i] in b:
            s.append(a[i])
        i = i + 1
    n = 0


def intersection(a, b):
    d = a + b
    return d


def intersection(a, b):
    i = 0
    s = []
    while i < len(a) and i < len(b):
        if a[i] in b:
            s.append(a[i])
        i = i + 1
    return s


def union(a, b):
    i = 0
    seen = []
    while i < len(a):
        seen[a[i]] = True
        i = i + 1
        k = 0
        while k < len(b):
            if not b[k] in b:
                seen[b[k]] = True
            k = k + 1
    return seen

Merge two lists into a single one.


def intersection(a, b):
    seen = {}
    i = 0
    while i < len(a):
        if a[i] in b and not a[i] in seen:
            seen[a[i]] = True
        i = i + 1
    return seen


def union(a, b):
    i = 0
    dic = {}
    while i < len(a):
        dic[a[i]] = True
        i = i + 1
        j = 0
        while j < len(b):
            if not b[j] in dic:
                dic[b[j]] = True
            j = j + 1
    return dic

Merge two lists into a single one.


def union(x, y):
    answer = []
    check = {}
    i = 0
    while i < len(x):
        if not x[i] in check:
            answer.append(x[i])
            check[x[i]] = True
        elif not y[i] in check:
            answer.append(y[i])
            check[y[i]] = True
        i = i + 1

Merge two lists into a single one.


def union(a, b):
    seen = []
    i = 0
    while i < len(a):
        seen[a[i]] = True
        i = i + 1
    j = 0
    while j < len(b):
        if b[k] not in b:
            seen[b[k]] = True
        j = j + 1
    return

Merge two lists into a single one.


def union(x, y):
    answer = []
    check = {}
    i = 0
    while i < len(x):
        if not x[i] in check:
            answer.append(x[i])
            check[x[i]] = True
        elif not y[i] in check:
            answer.append(y[i])
            check[y[i]] = True
        i = i + 1
    return answer

Merge two lists into a single one.


def union(a, b):
    i = 0
    seen = []
    while i < len(a):
        if not a[i] in a:
            seen[a[i]] = True
        i = i + 1
        k = 0
        while k < len(b):
            if not b[k] in b:
                seen[b[k]] = True
            k = k + 1
    return seen

Merge two lists into a single one.


def intersection(a, b):
    i = 0
    s = []
    while i < len(a) and i < len(b):
        if a[i] in b:
            s.append(a[i])
        i = i + 1
    return s
    n = 0
    x = []
    while n < len(s):
        if s[n] not in s:
            x.append(s[n])
        n = n + 1
    return x


def intersection(a, b):
    i = 0
    s = []
    while i < len(a) and i < len(b):
        if a[i] in b:
            s.append(a[i])
        i = i + 1
    n = 0
    x = []
    while n < len(s):
        if s[n] not in s:
            x.append(s[n])
        n = n + 1
    return x


def union(a, b):
    i = 0
    dic = {}
    while i < len(a):
        dic[a[i]] = True
        i = i + 1
    j = 0
    while j < len(b):
        if not b[j] in dic:
            dic[b[j]] = True
        j = j + 1
    return dic

Merge two lists into a single one.


def intersection(a, b):
    int_seen = {}
    k = 0
    while k < len(a):
        if a[k] in b:
            int_seen[a[k]] = True
        k = k + 1
    return int_seen


def union(a, b):
    seen = {}
    i = 0
    while i < len(a):
        if a[i] not in seen:
            seen[a[i]] = True
        i = i + 1
    j = 0
    while j < len(b):
        if b[j] not in seen:
            seen[b[j]] = True
        j = j + 1
    return seen

Merge two lists into a single one.


def union(x, y):
    answer = []
    check = {}
    i = 0
    while i < len(x):
        if not x[i] in check:
            answer.append(x[i])
            check[x[i]] = True
        i = i + 1
    j = 0
    while i < len(y):
        if not y[j] in check:
            answer.append(y[j])
            check[y[j]] = True
        j = j + 1
    return answer

Merge two lists into a single one.


def union(a, b):
    s = a + b
    return set(s)

Merge two lists into a single one.


def intersection(a, b):
    i = 0
    s = []
    while i < len(a) and i < len(b):
        if a[i] in b:
            s.append(a[i])
        i = i + 1
    n = 0
    prev = s[n]
    curr = s[n + 1]
    x = []
    while curr < len(s):
        if curr != prev:
            x.append(prev)
        n = n + 1
    return x


def intersection(a, b):
    int_seen = {}
    f = 0
    while f < len(a):
        if a[f] in b:
            int_seen[a[f]] = True
        f = f + 1
    return int_seen


Merge two lists into a single one.


def intersection(a, b):
    seen = {}
    i = 0
    while i < leb(a):
        if a[i] in b and not a[i] in seen:
            seen[a[i]] = True
        i = i + 1
    return seen


def union(a, b):
    seen = {}
    i = 0
    while i < len(a):
        seen[a[i]] = True
        i = i + 1
    j = 0
    while j < len(b):
        if not b[j] in seen:
            seen[b[j]] = True
        j = j + 1
    return seen

Merge two lists into a single one.


def intersection(a, b):
    seen = {}
    i = 0
    while i < len(a):
        if a[i] in b and not a[i] in seen:
            seen[a[i]] = True
        i = i + 1
    return seen


def union(a, b):
    seen = []
    i = 0
    while i < len(a):
        seen[a[i]] = True
        i = i + 1
    j = 0
    while j < len(b):
        if not b[j] in b:
            seen[b[j]] = True
        j = j + 1
    return seen

Merge two lists into a single one.


def intersection(a, b):
    i = 0
    s = []
    while i < len(a) and i < len(b):
        if a[i] in b:
            s.append(a[i])
        i = i + 1
    n = 0
    prev = s[n]
    curr = s[n + 1]
    x = []
    while n - 1 < len(s):
        if curr != prev:
            x.append(prev)
        n = n + 1
    return x


def union(a, b):
    seen = []
    i = 0
    while i < len(a):
        seen[a[i]] = True
        i = i + 1
    j = 0
    while j < len(b):
        if not b[j] in seen:
            seen[b[j]] = True
        j = j + 1
    return seen

Merge two lists into a single one.


def union(a, b):
    i = 0
    seen = []
    while i < len(a):
        seen[a[i]] = True
        i = i + 1
    k = 0
    while k < len(b):
        if not b[k] in seen:
            seen[b[k]] = True
        k = k + 1
    return seen

Merge two lists into a single one.


def intersection(a, b):
    i = 0
    s = []
    while i < len(a) and i < len(b):
        if a[i] in b:
            s.append(a[i])
        i = i + 1
    return set(s)


def union(a, b):
    set = {}
    i = 0
    while i < len(a):
        set[a[i]] = True
        i = i + 1
    j = 0
    while j < len(b):
        if not b[j] in set:
            set[b[j]] = True
        j = j + 1
    return set

Merge two lists into a single one.


def intersection(a, b):
    set = {}
    i = 0
    while i < len(a):
        if a[i] in b and not a[i] in set:
            set[a[i]] = True
        i = i + 1
        return set


def intersection(a, b):
    seen = []
    i = 0
    while i < len(a):
        if a[i] in b and not a[i] in seen:
            seen[a[i]] = True
        i = i + 1
    return seen


def union(a, b):
    seen = []
    i = 0
    while i < len(a):
        seen[a[i]] = True
        i = i + 1
    k = 0
    while k < len(b):
        if not b[k] in seen:
            seen[b[k]] = True
        k = k + 1
    return seen

Merge two lists into a single one.


def union(a, b):
    seen = {}
    i = 0
    while i < len(a):
        seen[a[i]] = True
        i = i + 1
    k = 0
    while k < len(b):
        if not b[k] in seen:
            seen[b[k]] = True
        k = k + 1
    return seen

Merge two lists into a single one.


def intersection(a, b):
    d = a + b
    return d


def union(a, b):
    c = a, b
    return c

Merge two lists into a single one.


def union(a, b):
    c = a and b
    return c

Merge two lists into a single one.


def union(a, b):
    c = []
    ab = a + b
    for i in ab:
        if not i in c:
            c.append(i)
    return c

Merge two lists into a single one.


def intersection(a, b):
    c = []
    for i in a:
        if i in a and i in b and not i in c:
            c.append(i)
    return c


def intersection(a, b):
    d = c - b
    return d


Merge two lists into a single one.


def intersection(a, b):
    c = []
    for i in a:
        if i in b and not i in c:
            c.append(i)
    return c


def union(a, b):
    i = 0
    while i < len(a):
        if a != b:
            print(a, b)

Merge two lists into a single one.


def intersection(a, b):
    c = []
    c = a + b
    seen = {}
    i = 0
    while i < len(c):
        if lines(c) in seen:
            sys.stdout.write(lines[c])
        i = i + 1


def union(a, b):
    c = []
    c = a - b
    seen = {}
    i = 0
    while i < len(c):
        if lines(c) not in seen:
            sys.stdout.write(lines[c])
        i = i + 1

Merge two lists into a single one.


def intersection(a, b):
    seen = {}
    i = 0
    while i < len(a):
        if a[i] in b and not a[i] in seen:
            seen[a[i]] = True
        i = i + 1
        return seen


def union(a, b):
    seen = {}
    i = 0
    while i < len(a):
        seen[a[i]] = True
        i = i + 1
    j = 0
    while j < len(b):
        if not b[j] in seen:
            seen[b[j]] = True
        j = j + 1
    return seen

Merge two lists into a single one.


def union(x, y):
    answer = []
    check = {}
    i = 0
    while i < len(x):
        if not x[i] in check:
            answer.append(x[i])
            check[x[i]] = True
        i = i + 1
    j = 0
    while i < len(y):
        if not y[j] in check:
            answer.append(y[j])
            check[y[j]] = True
        j = j + 1
    return check

Merge two lists into a single one.


def intersection():
    import sys
    d1 = {}
    i = 0
    while i != len(f1con):
        line = f1con[i].rstrip()
        d1[line] = True
        i = i + 1
    dups = []
    i = 0
    while i != len(f2con):
        line = f2con[i].rstrip()
        if line in list(d1.keys()):
            dups.append(line)
        i = i + 1
    dups = sorted(list(set(dups)))
    return dups


def union(f1con, f2con):
    import sys
    d1 = {}
    i = 0
    while i != len(f1con):
        line = f1con[i].rstrip()
        d1[line] = True
        i = i + 1
    dups = []
    i = 0
    while i != len(f2con):
        line = f2con[i].rstrip()
        if line in list(d1.keys()):
            dups.append(line)
        i = i + 1
    dups = sorted(list(set(dups)))
    return dups

Merge two lists into a single one.


def union(x, y):
    answer = []
    check = {}
    i = 0
    while i < len(x):
        answer.append(x[i])
        check[x[i]] = True
        i = i + 1
    j = 0
    while i < len(y):
        if not y[j] in check:
            answer.append(y[j])
            check[y[j]] = True
        j = j + 1
    return answer

Merge two lists into a single one.


def union(x, y):
    answer = []
    check = {}
    i = 0
    while i < len(x):
        if not x[i] in check:
            answer.append(x[i])
            check[x[i]] = True
        i = i + 1
    j = 0
    while j < len(y):
        if not y[j] in check:
            answer.append(y[j])
            check[y[j]] = True
        j = j + 1
    return answer

Merge two lists into a single one.


def intersection():
    d1 = {}
    i = 0
    while i != len(f1con):
        line = f1con[i].rstrip()
        d1[line] = True
        i = i + 1
    dups = []
    i = 0
    while i != len(f2con):
        line = f2con[i].rstrip()
        if line in list(d1.keys()):
            dups.append(line)
        i = i + 1
    dups = sorted(list(set(dups)))
    return dups


def union(f1con, f2con):
    union = []
    i = 0
    while i != len(f1con):
        union.append(f1con[i])
        i = i + 1
    i = 0
    while i != len(f1con):
        union.append(f1con[i])
        i = i + 1
    union = sorted(list(set(union)))
    return union

Merge two lists into a single one.


def intersection(f1con, f2con):
    d1 = {}
    i = 0
    while i != len(f1con):
        line = f1con[i].rstrip()
        d1[line] = True
        i = i + 1
    dups = []
    i = 0
    while i != len(f2con):
        line = f2con[i].rstrip()
        if line in list(d1.keys()):
            dups.append(line)
        i = i + 1
    dups = sorted(list(set(dups)))
    return dups


def union(a, b):
    seen = {}
    i = 0
    while i < len(a):
        seen[a[i]] = True
        i = i + 1
    k = 0
    while k < len(b):
        if not b[k] in seen:
            seen[b[k]] = True
        k = k + 1
        return seen

Merge two lists into a single one.


def intersection(a, b):
    seen = {}
    i = 0
    while i < len(a):
        if a[i] in b and not a[i] in seen:
            seen[a[i]] = True
        i = i + 1
    return seen


Merge two lists into a single one.


def intersection(f1con, f2con):
    d1 = {}
    i = 0
    while i != len(f1con):
        line = f1con[i].rstrip()
        d1[line] = True
        i = i + 1
    dups = []
    i = 0
    while i != len(f2con):
        line = f2con[i]
        if line in list(d1.keys()):
            dups.append(line)
        i = i + 1
    dups = sorted(list(set(dups)))
    return dups


def intersection(f1con, f2con):
    d1 = {}
    i = 0
    while i != len(f1con):
        line = f1con[i]
        d1[line] = True
        i = i + 1
    dups = []
    i = 0
    while i != len(f2con):
        line = f2con[i]
        if line in list(d1.keys()):
            dups.append(line)
        i = i + 1
    dups = sorted(list(set(dups)))
    return dups


def union(f1con, f2con):
    d1 = {}
    union = []
    i = 0
    while i != len(f1con):
        line = f1con[i]
        d1[line] = True
        i = i + 1
    i = 0
    while i != len(f2con):
        line = f2con[i]
        if line in list(d1.keys()):
            union.append(line)
        i = i + 1
    union = sorted(list(set(union)))
    return union

Merge two lists into a single one.


def union(a, b):
    seen = {}
    i = 0
    while i < len(a):
        seen[a[i]] = True
        i = i + 1
    k = 0
    while k < len(b):
        if not b[k] in seen:
            seen[b[k]] = True
            k = k + 1
        return seen

Merge two lists into a single one.


def union(a, b):
    seen = {}
    i = 0
    while i < len(a):
        seen[a[i]] = True
        i = i + 1
    k = 0
    while k < len(b):
        if not b[k] in seen:
            seen[b[k]] = True
        k = k + 1
    return seen

Merge two lists into a single one.


def reverse(a):
    i = 0
    while i < len(a) / 2:
        tmp = a[i]
        a[i] = a[len(a) - i - 1]
        a[len(a) - i - 1]
        i = i + 1
    return a

Reverse a list of elements.


def union(f1con, f2con):
    union = []
    i = 0
    while i != len(f1con):
        union.append(f1con[i])
        i = i + 1
    i = 0
    while i != len(f2con):
        union.append(f2con[i])
        i = i + 1
    union = sorted(list(set(union)))
    return union

Merge two lists into a single one.


def reverse(a):
    i = 0
    while i < len(a) / 2:
        tmp = a[i]
        a[i] = a[len(a) - i - 1]
        a[len(a) - i - 1] = tmp
        i = i + 1
    return a

Reverse a list of elements.


Reverse a list of elements.


def intersection(x, y):
    check = {}
    i = 0
    while i < len(x):
        if x[i] in y and not x[i] in check:
            check[x[i]] = True
        i = i + 1
    return check


def union(f1con, f2con):
    union = []
    i = 0
    while i != len(f1con):
        union.append(f1con[i])
        i = i + 1
    i = 0
    while i != len(f2con):
        union.append(f2con[i])
        i = i + 1
    union = sorted(list(dict(union)))
    return union

Merge two lists into a single one.


def intersection(f1con, f2con):
    d1 = {}
    i = 0
    while i != len(f1con):
        line = f1con[i]
        d1[line] = True
        i = i + 1
    dups = []
    i = 0
    while i != len(f2con):
        line = f2con[i]
        if line in list(d1.keys()):
            dups.append(line)
        i = i + 1
    dups = sorted(list(dict(dups)))
    return dups


def union(a, b):
    i = 0
    while i < len(a):
        if a != b:
            c = a, b
            return c
            i = i + 1

Merge two lists into a single one.


def union(a, b):
    i = 0
    while i < len(a):
        if a != b:
            c = (a, b) - (a + b)
            return c
            i = i + 1

Merge two lists into a single one.


def union(a, b):
    seen = {}
    i = 0
    while i < len(a):
        seen[a[i]] = True
        i = i + 1
    j = 0
    while j < len(b):
        if not b[j] in seen:
            seen[b[j]] = True
        j = j + 1
    return seen

Merge two lists into a single one.


def union(f1con, f2con):
    union = []
    i = 0
    while i != len(f1con):
        union.append(f1con[i])
        i = i + 1
    i = 0
    while i != len(f2con):
        union.append(f2con[i])
        i = i + 1
    unionorg = {}
    i = 0
    while i != len(union):
        unionorg[union] = True
        i = i + 1
    for union in sorted(unionorg):
        if unionorg[union]:
            print(union)
    return union

Merge two lists into a single one.


def intersection(f1con, f2con):
    d1 = {}
    i = 0
    while i != len(f1con):
        line = f1con[i]
        d1[line] = True
        i = i + 1
    dups = []
    i = 0
    while i != len(f2con):
        line = f2con[i]
        if line in list(d1.keys()):
            dups.append(line)
        i = i + 1
    return dups


Merge two lists into a single one.


def union(a, b):
    i = 0
    c = []
    while i < len(a):
        if a != b:
            c = a, b
            return c
            i = i + 1

Merge two lists into a single one.


def union(f1con, f2con):
    union = []
    i = 0
    while i != len(f1con):
        union.append(f1con[i])
        i = i + 1
    i = 0
    while i != len(f2con):
        union.append(f2con[i])
        i = i + 1
    unionorg = {}
    i = 0
    while i != len(union):
        unionorg[union] = True
        i = i + 1
    dups = sorted(list(set(dups)))
    return '/n', unionorg

Merge two lists into a single one.


def union(f1con, f2con):
    union = []
    i = 0
    while i != len(f1con):
        union.append(f1con[i])
        i = i + 1
    i = 0
    while i != len(f2con):
        union.append(f2con[i])
        i = i + 1
    unionorg = {}
    i = 0
    while i != len(union):
        unionorg[union[i]] = True
        i = i + 1
    dups = sorted(list(set(dups)))
    return '/n', unionorg

Merge two lists into a single one.


def union(a, b):
    seen = {}
    c = []
    i = 0
    while i < len(a) and i < len(b):
        if a[i] or b[i] not in seen:
            seen[a[i]] = True
            seen[b[i]] = True
        i = i + 1
    for number in seen:
        c.append(number)
    return c

Merge two lists into a single one.


def union(f1con, f2con):
    union = []
    i = 0
    while i != len(f1con):
        union.append(f1con[i])
        i = i + 1
    i = 0
    while i != len(f2con):
        union.append(f2con[i])
        i = i + 1
    unionorg = {}
    i = 0
    while i != len(union):
        unionorg[union[i]] = True
        i = i + 1
    return '/n', unionorg

Merge two lists into a single one.


def union(f1con, f2con):
    union = []
    i = 0
    while i != len(f1con):
        union.append(f1con[i])
        i = i + 1
    i = 0
    while i != len(f2con):
        union.append(f2con[i])
        i = i + 1
    unionorg = {}
    i = 0
    while i != len(union):
        unionorg[union[i]] = True
        i = i + 1
    pureunion = []
    for union in sorted(unionorg):
        if unionorg[union]:
            pureunion.append(union)
    return pureunion

Merge two lists into a single one.


def union(a, b):
    i = 0
    while i < len(a):
        if a != b:
            a.append(c)
            i = i + 1
    return c

Merge two lists into a single one.


def union(a, b):
    union = []
    i = 0
    while i < len(a) and i < len(b):
        if a[i] or b[i] not in seen:
            seen[a[i]] = True
            seen[b[i]] = True
        for number in seen:
            union.append(number)
    return union

Merge two lists into a single one.


def intersection(f1con, f2con):
    d1 = {}
    i = 0
    while i != len(f1con):
        line = f1con[i]
        d1[line] = True
        i = i + 1
    dups = []
    i = 0
    while i != len(f2con):
        line = f2con[i]
        if line in list(d1.keys()):
            dups.append(line)
        i = i + 1
    dups = sorted(list(set(dups)))
    return dups


def union(a, b):
    i = 0
    c = []
    while i < len(a):
        if a != b:
            a.append(c)
            i = i + 1
    return c

Merge two lists into a single one.


def intersection(a, b):
    seen = {}
    i = 0
    while i < len(a):
        if a[i] in b and not a[i] in seen:
            seen[a[i]] = True
        i = i + 1
    return seen


def union(a, b):
    union = []
    i = 0
    while i < len(a) and i < len(b):
        if a[i] or b[i] not in seen:
            seen[a[i]] = True
            seen[b[i]] = True
        i = i + 1
    for number in seen:
        union.append(number)
    return union

Merge two lists into a single one.


def intersection(f1con, f2con):
    d1 = {}
    i = 0
    while i != len(f1con):
        line = f1con[i]
        d1[line] = True
        i = i + 1
    dups = []
    i = 0
    while i != len(f2con):
        line = f2con[i]
        if line in list(d1.keys()):
            dups.append(line)
        i = i + 1
    dupsorg = {}
    i = 0
    while i != len(dups):
        dupsorg[dups[i]] = True
        i = i + 1
    puredups = []
    for dups in sorted(dupsorg):
        if dupsorg[dups]:
            puredups.append(dups)
    return puredups
    return puredups


def intersection(a, b):
    seen = {}
    c = []
    i = 0
    while i < len(a):
        seen[a[i]] = True
        i = i + 1
    i = 0
    while i < len(b):
        if b[i] in seen:
            c.append(b[i])
        i = i + 1
    return c


def union(a, b):
    i = 0
    c = []
    while i < len(a):
        if a != b:
            a.append(c)
            return c
            i = i + 1

Merge two lists into a single one.


def union(a, b):
    a = a + b
    seen = {}
    c = []
    i = 0
    while i < len(a):
        if a[i] not in seen:
            seen[a[i]] = True
        i = i + 1
    for number in seen:
        c.append(number)
    return c

Merge two lists into a single one.


def union(a, b):
    c = a + b
    union = []
    i = 0
    while i < len(a) and i < len(b):
        if c[i] not in seen:
            seen[c[i]] = True
        i = i + 1
    for number in seen:
        union.append(number)
    return union

Merge two lists into a single one.


def union(a, b):
    c = a + b
    union = []
    i = 0
    while i < len(c):
        if c[i] not in seen:
            seen[c[i]] = True
        i = i + 1
    for number in seen:
        union.append(number)
    return union

Merge two lists into a single one.


Merge two lists into a single one.


def intersection(a, b):
    seen = {}
    c = []
    i = 0
    while i < len(a):
        seen[a[i]] = True
        i = i + 1
    i = 0
    while i < len(b):
        if b[i] in a:
            seen[b[i]] = True
        i = i + 1
    return c


def intersection(a, b):
    seen = {}
    appended = {}
    c = []
    i = 0
    while i < len(a):
        seen[a[i]] = True
        i = i + 1
    i = 0
    while i < len(b):
        if b[i] in seen and b[i] not in appended:
            c.append(b[i])
            appended[b[i]] = True
        i = i + 1
    return c


def union(a, b):
    c = set(a + b)
    return c

Merge two lists into a single one.


def intersection(a, b):
    c = []
    for item in a:
        if item in b:
            c.append(item)
    return set(c)


def union(a, b):
    c = []
    for item in a:
        if item not in c:
            c.append(item)
    for item in b:
        if item not in c:
            c.append(item)
    return c

Merge two lists into a single one.


def intersection(a, b):
    c = []
    for item in a:
        if item in b and item not in c:
            c.append(item)
    return c


def union(a, b):
    union = a + b
    seen = {}
    c = []
    i = 0
    while i < len(a):
        if a[i] not in seen:
            seen[a[i]] = True
        i = i + 1
    for number in seen:
        c.append(number)
    return c

Merge two lists into a single one.


def intersection(a, b):
    seen = {}
    append = {}
    c = []
    i = 0
    while i < len(a):
        seen[a[i]] = True
    i = i + 1
    i = 0
    while i < len(b):
        if b[i] in seen and b[i] not in append:
            c.append(b[i])
            append[b[i]] = True
        i = i + 1
    return c


def intersection(a, b):
    seen = {}
    append = {}
    c = []
    i = 0
    while i < len(a):
        seen[a[i]] = True
        i = i + 1
    i = 0
    while i < len(b):
        if b[i] in seen and b[i] not in append:
            c.append(b[i])
            append[b[i]] = True
        i = i + 1
    return c


def union(a, b):
    a = a - b
    seen = {}
    c = []
    i = 0
    while i < len(a):
        if a[i] not in seen:
            seen[a[i]] = True
        i = i + 1
    for number in seen:
        c.append(number)
    return c

Merge two lists into a single one.


def union(a, b):
    union = a + b
    seen = {}
    c = []
    i = 0
    while i < len(union):
        if a[i] not in seen:
            seen[a[i]] = True
        i = i + 1
    for number in seen:
        c.append(number)
    return c

Merge two lists into a single one.


def union(a, b):
    i = 0
    while i < len(a) and a[i] != b:
        i = i + 1
    return i < len(a)

Merge two lists into a single one.


def intersection(a, b):
    seen = {}
    appended = {}
    c = []
    i = 0
    while i < len(a):
        seen[a[i]] = True
    i = i + 1
    i = 0
    while i < len(b):
        if b[i] in seen and b[i] not in appended:
            c.append(b[i])
            appended[b[i]] = True
        i = i + 1
    return c


def intersection(a, b):
    int = {}
    i = 0
    while i < len(a):
        if a[i] in b and not a[i] in int:
            int[a[i]] = True
        i = i + 1
    print(int)


def union(a, b):
    un = {}
    i = 0
    while i < len(a):
        un[a[i]] = True
        i = i + 1
    h = 0
    while i < len(b):
        un[b[h]] = True
        h = h + 1
    print(un)

Merge two lists into a single one.


def intersection(a, b):
    int = {}
    i = 0
    while i < len(a):
        if a[i] in b and not a[i] in int:
            int[a[i]] = True
        i = i + 1
    return int


def union(a, b):
    un = {}
    i = 0
    while i < len(a):
        un[a[i]] = True
        i = i + 1
    h = 0
    while i < len(b):
        un[b[h]] = True
        h = h + 1
    return un

Merge two lists into a single one.


def union(a, b):
    un = {}
    i = 0
    while i < len(a):
        un[a[i]] = True
        i = i + 1
    h = 0
    while i < len(b):
        if not b[h] in un:
            un[b[h]] = True
        h = h + 1
    return un

Merge two lists into a single one.


Merge two lists into a single one.


def intersection(a, b):
    inter = {}
    i = 0
    while i < len(a):
        if a[i] in b and not a[i] in inter:
            inter[a[i]] = True
        i = i + 1
    return inter


def union(a, b):
    un = {}
    i = 0
    while i < len(a):
        un[a[i]] = True
        i = i + 1
    j = 0
    while i < len(b):
        if not b[j] in un:
            un[b[j]] = True
        j = j + 1
    return un

Merge two lists into a single one.


def find_position_of_smallest(a, i):
    j = i
    while i < len(a):
        if a[i] < a[j]:
            j = i
        i = i + 1
    return j

def sort(a):
    i = 0
    while i < len(a):
        k = find_position_of_smallest(a, i)
        swap(a, i, k)
        i = i + 1


def swap(a, i, j):
    t = a[i]
    a[i] = a[j]
    a[j] = t

def reverse(a):
    i = 0
    while i < len(a) / 2:
        j = len(a) - 1 - i
        swap(a, i, j)
        i = i + 1

Reverse a list of elements.


Reverse a list of elements.


def swap(a, i, j):
    tmp = a[j]
    a[j] = a[i]
    a[i] = tmp

def find_smallest_position(a, i):
    p = i
    j = i + 1
    while j < len(a):
        if a[j] < a[p]:
            p = j
        j = j + 1
    return p

def selection_sort(a):
    i = 0
    while i < len(a):
        p = find_smallest_position(a, i)
        swap(a, i, p)
        i = i + 1


def reverse(a):
    j = 0
    i = len(a) - 1
    while j < len(a) / 2:
        tmp = a[j]
        a[j] = a[i]
        a[i] = tmp
        j = j + 1
        i = i + 1
    return a

Reverse a list of elements.


def swap(a, i, j):
    while j < len(a) / 2:
        tmp = a[j]
        a[j] = a[i]
        a[i] = tmp
        j = j + 1
        i = i + 1
    return a

def reverse(a):
    j = 0
    i = len(a) - 1
    print(swap(a, i, j))

Reverse a list of elements.


def swap(a, i, j):
    while j < len(a):
        tmp = a[j]
        a[j] = a[i]
        a[i] = tmp
        j = j + 1
        i = i + 1
    return a

def reverse(a):
    j = 0
    i = len(a) - 1
    print(swap(a, i, j))

Reverse a list of elements.


def swap(a, i, j):
    while j < len(a) / 2:
        tmp = a[j]
        a[j] = a[i]
        a[i] = tmp
        j = j + 1
        i = i - 1
    return a

def reverse(a):
    j = 0
    i = len(a) - 1
    print(swap(a, i, j))

Reverse a list of elements.


def reverse(a):
    i = 0
    while i < len(a):
        tmp = a[i]
        a[i] = a[-i]
        a[-i] = tmp

Reverse a list of elements.


def reverse(a):
    i = 0
    while i < len(a):
        tmp = a[i]
        a[i] = a[-i]
        a[-i] = tmp
        i += 1

Reverse a list of elements.


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp

def reverse(a):
    i = 0
    j = len(a) - 1
    while i < len(a) / 2:
        swap(a, a[i], a[j])
        i = i + 1
        j = j - 1
    return a

Reverse a list of elements.


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp
    return a

def reverse(a):
    i = 0
    while i < len(a) / 2:
        j = a[len(a) - i]
        swap(a, i, j)
        i = i + 1

Reverse a list of elements.


def reverse(a):
    i = 0
    while i < len(a) / 2:
        tmp = a[i]
        a[i] = a[-i]
        a[-i] = tmp
        i += 1

Reverse a list of elements.


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp
    return a

def reverse(a):
    i = 0
    while i < len(a) / 2:
        j = a[len(a) - 1 - i]
        swap(a, i, j)
        i = i + 1

Reverse a list of elements.


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp
    return a

def reverse(a):
    i = 0
    while i < len(a) / 2:
        j = a[len(a) - i - 1]
        swap(a, i, j)
        i = i + 1

Reverse a list of elements.


def reverse(a):
    i = 0
    while i < len(a) / 2:
        tmp = a[i]
        a[i] = a[len(a) - i - 1]
        a[len(a) - 1 - i] = tmp
        i += 1

Reverse a list of elements.


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp

def reverse(a):
    i = 0
    j = len(a)
    while i < len(a) / 2:
        swap(a, i, j)
        i = i + 1
        j = j - 1

Reverse a list of elements.


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp

def reverse(a):
    i = 0
    j = len(a) - 1
    while i < len(a) / 2:
        swap(a, a[i], a[j])
        i = i + 1
        j = len(a) - i - 1
    return a

Reverse a list of elements.


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp

def reverse(a):
    i = 0
    j = len(a) - 1
    while i < len(a) / 2:
        swap(a, i, len(a) - i - 1)
        i = i + 1
    return a

Reverse a list of elements.


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp

def reverse(a):
    i = 0
    while i < len(a) / 2:
        j = a[len(a) - i - 1]
        swap(a, i, j)
        i = i + 1
    return a

Reverse a list of elements.


def selection_sort(a):
    i = 0
    while i < len(a):
        p = i
        j = i + 1
        while j < len(a):
            if a[j] < a[p]:
                p = j
            j = j + 1
        tmp = a[p]
        a[p] = a[i]
        a[i] = tmp
        i = i + 1


def reverse(a):
    i = 0
    while i < len(a) / 2:
        swap(a, i, len(a) - i - 1)
        i += 1

Reverse a list of elements.


Reverse a list of elements.


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp

def reverse(a):
    i = 0
    while i < len(a) / 2:
        j = len(a) - i - 1
        swap(a, i, j)
        i = i + 1
    return a

Reverse a list of elements.


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp

def reverse(a):
    i = 0
    while i < len(a) / 2:
        swap(a, i, len(a) - i - 1)
        i = i + 1
    return a

Reverse a list of elements.


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp

def reverse(a):
    i = 0
    j = len(a)
    while i < len(a) / 2:
        swap(a, i, j)
        i += 1
        j -= 1

Reverse a list of elements.


def selection_sort(a):
    i = 0
    while i < len(a):
        p = i
        j = i + 1
        while j < len(a):
            if a[j] < a[p]:
                p = j
            j += 1
        temp = a[p]
        a[p] = a[i]
        a[i] = temp
        i += 1


def reverse(a):
    i = 0
    while i < len(a):
        a[i] = a[len(a) - 1 - i]

Reverse a list of elements.


def reverse(a):
    i = 0
    while i < len(a):
        a[i] = a[len(a) - 1 - i]
        i += 1

Reverse a list of elements.


def reverse(a):
    i = 0
    while i < len(a):
        tmp = a[i]
        a[i] = a[len(a) - 1 - i]
        a[len(a) - 1 - i] = tmp
        i += 1

Reverse a list of elements.


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp

def reverse(a):
    i = 0
    j = len(a)
    while i < len(a) / 2:
        func_reverse.swap(a, i, j)
        i += 1
        j -= 1

Reverse a list of elements.


def selection_sort(a):
    i = 0
    while i < len(a):
        p = i
        j = i + 1
    while j < len(a):
        if a[j] < a[p]:
            p = j
        j = j + 1
    tmp = a[p]
    a[p] = a[i]
    a[i] = tmp
    i = i + 1
    i = 0
    while i < len(a):
        print(a[i])
        i += 1
    return a


def selection_sort(a):
    i = 0
    while i < len(a):
        p = i
        j = i + 1
        while j < len(a):
            if a[j] < a[p]:
                p = j
            j = j + 1
    tmp = a[p]
    a[p] = a[i]
    a[i] = tmp
    i = i + 1
    i = 0
    while i < len(a):
        print(a[i])
        i += 1
    return a


def selection_sort(a):
    i = 0
    while i < len(a):
        p = i
        j = i + 1
        while j < len(a):
            if a[j] < a[p]:
                p = j
            j = j + 1
        tmp = a[p]
        a[p] = a[i]
        a[i] = tmp
        i = i + 1
        i = 0
        while i < len(a):
            print(a[i])
            i += 1
    return a


def selection_sort(a):
    i = 0
    while i < len(a):
        p = i
        j = i + 1
        while j < len(a):
            if a[j] < a[p]:
                p = j
            j = j + 1
        tmp = a[p]
        a[p] = a[i]
        a[i] = tmp
        i = i + 1
        i = 0
        while i < len(a):
            print(a)
            i += 1
    return a


def selection_sort(a):
    i = 0
    while i < len(a):
        p = i
        j = i + 1
        while j < len(a):
            if a[j] < a[p]:
                p = j
            j = j + 1
        tmp = a[p]
        a[p] = a[i]
        a[i] = tmp
        i = i + 1
        i = 0
        while i < len(a):
            i += 1
    return a


def reverse(a):
    i = 0
    j = len(a)
    while i < len(a) / 2:
        tmp = a[j]
        a[j] = a[i]
        a[i] = tmp
        i = i + 1
        j = j + 1

Reverse a list of elements.


def reverse(a):
    i = 0
    j = len(a)
    while i < len(a) / 2:
        tmp = a[j]
        a[j] = a[i]
        a[i] = tmp
        i = i + 1
        j = j - 1

Reverse a list of elements.


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp
    return a

def reverse(a):
    i = len(a) - 1
    j = j + 1
    while i != 0 and j < len(a):
        swap(a, i, j)
        i = i - 1
        j = j + 1
    return a

Reverse a list of elements.


Reverse a list of elements.


def reverse(a):
    i = 0
    j = len(a)
    if j % 2 == 0:
        while i < len(a) / 2:
            tmp = a[j]
            a[j] = a[i]
            a[i] = tmp
            i = i + 1
            j = j - 1
    else:
        while i < len(a) / 2 + 1:
            tmp = a[j]
            a[j] = a[i]
            a[i] = tmp
            i = i + 1
            j = j - 1

Reverse a list of elements.


def reverse(a):
    i = 0
    while i < len(a):
        tmp = a[len(a) - 1 - i]
        a[len(a) - 1 - i] = a[i]
        a[i] = tmp
        i += 1

Reverse a list of elements.


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp
    return a

def reverse(a):
    i = len(a) - 1
    j = 0
    while i != 0 and j < len(a):
        swap(a, i, j)
        i = i - 1
        j = j + 1
    return a

Reverse a list of elements.


def reverse(a):
    i = 0
    while i < len(a) / 2:
        tmp = a[len(a) - 1 - i]
        a[len(a) - 1 - i] = a[i]
        a[i] = tmp
        i += 1

Reverse a list of elements.


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp

def reverse(a):
    z = 0
    x = len(a)
    if len(a) % 2 != 0:
        while z < len(a) / 2:
            swap(a, z, x)
            z = z + 1
            x = x - 1
    else:
        while z < len(a) / 2 + 1:
            swap(a, z, x)
            z = z + 1
            x = x - 1

Reverse a list of elements.


def reverse(a):
    i = 0
    j = len(a)
    while i < len(a):
        tmp = a[j - i]
        a[j - i] = a[i]
        a[i] = tmp
        i = i + 1

Reverse a list of elements.


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp
    return a

def reverse(a):
    i = len(a) - 1
    j = 0
    while i != 0 and j < len(a) and i != j:
        swap(a, i, j)
        i = i - 1
        j = j + 1
    return a

Reverse a list of elements.


def reverse(a):
    i = 0
    j = len(a)
    if len(a) == 1:
        return a
    else:
        while i < len(a):
            tmp = a[j - i]
            a[j - i] = a[i]
            a[i] = tmp
            i = i + 1

Reverse a list of elements.


def reverse(a):
    i = 0
    while i < len(a):
        tmp = a[len(a) - i]
        a[len(a) - i] = a[i]
        a[i] = tmp
        i = i + 1

Reverse a list of elements.


def swap(a, i, j):
    tmp = a[j]
    a[j] = a[i]
    a[i] = tmp

def reverse(a):
    i = 0
    j = len(a) - 1
    while i < len(a):
        swap(a, i, j)
    i += 1
    j = j - 1

Reverse a list of elements.


def reverse(a):
    i = 0
    j = len(a)
    if len(a) == 1:
        return a
    else:
        while i < len(a):
            tmp = a[j - i - 1]
            a[j - i - 1] = a[i]
            a[i] = tmp
            i = i + 1

Reverse a list of elements.


def swap(a, i, j):
    tmp = a[j]
    a[j] = a[i]
    a[i] = tmp

def reverse(a):
    i = 0
    j = len(a) - 1
    while i < len(a):
        swap(a, i, j)
        i += 1
        j = j - 1

Reverse a list of elements.


def swap(a, i, j):
    tmp = a[j]
    a[j] = a[i]
    a[i] = tmp

def reverse(a):
    i = 0
    j = len(a) - 1
    while i < len(a) / 2:
        swap(a, i, j)
        i += 1
        j = j - 1

Reverse a list of elements.


def selection_sort(a):
    i = 0
    while i < len(a):
        p = i
        j = j + 1
        while j < len(a):
            if a[j] < a[p]:
                p = j
            j += 1
        tmp = a[p]
        a[p] = a[i]
        a[i] = tmp
        i += 1


def selection_sort(a):
    i = 0
    while i < len(a):
        small = i
        j = small + 1
        while j < len(a):
            if a[j] < a[smal]:
                small = j
            j += 1
        tmp = a[small]
        a[small] = a[i]
        a[i] = tmp
        i += 1


def selection_sort(a):
    i = 0
    while i < len(a):
        small = i
        j = small + 1
        while j < len(a):
            if a[j] < a[small]:
                small = j
            j += 1
        tmp = a[small]
        a[small] = a[i]
        a[i] = tmp
        i += 1


def selection_sort(a):
    i = 0
    while i < len(a):
        p = i
        j = i + 1
        while j < len(a):
            if a[j] < a[p]:
                p = j
            j += 1
        tmp = a[p]
        a[p] = a[i]
        a[i] = tmp
        i += 1


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp
    return a

def reverse(a):
    i = len(a) - 1
    j = 0
    while i != 0 and j < len(a) and j != i:
        swap(a, i, j)
        i = i - 1
        j = j + 1
    return a

Reverse a list of elements.


def selection_sort(a):
    i = 0
    while i < len(a):
        p = 0
        j = 1
        while j < len(a):
            if a[j] < a[p]:
                p = j
            j += 1
        tmp = a[p]
        a[p] = a[i]
        a[i] = tmp
        i += 1


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp
    return a

def reverse(a):
    i = len(a) - 1
    j = 0
    while i != 0 and j < len(a):
        swap(a, i, j)
        i = i - 1
        j = j + 1
    return a

Reverse a list of elements.


Reverse a list of elements.


def reverse(a):
    i = 0
    while i < len(a):
        j = len(a) - i - 1
        tmp = a[j]
        a[j] = a[i]
        a[i] = tmp
        i = i + 1
        return a

Reverse a list of elements.


def find_smallest_position(a, i):
    p = i
    j = i + 1
    while j < len(a):
        if a[i] < a[p]:
            p = j
        j = j + 1
    return p

def swap(a, i, j):
    tmp = a[j]
    a[j] = a[i]
    a[i] = tmp

def selection_sort(a):
    i = 0
    while i < len(a):
        p = find_smallest_position(a, i)
        swap(a, i, j)
        i = i + 1


def selection_sort(a):
    i = 0
    p = i
    j = i + 1
    while j < len(a):
        if a[j] < a[p]:
            p = j
        j = j + 1
    return a


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp
    return a

def reverse(a):
    i = len(a) - 1
    j = 0
    while i >= 0 and j < len(a) and j != i:
        swap(a, i, j)
        i = i - 1
        j = j + 1
    return a

Reverse a list of elements.


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp
    return a

def reverse(a):
    i = len(a) - 1
    j = 0
    while i > 0 and j < len(a) and j != i:
        swap(a, i, j)
        i = i - 1
        j = j + 1
    return a

Reverse a list of elements.


def reverse(a):
    i = len(a) - 1
    j = 0
    while i > 0 and j < len(a) and j != i:
        tmp = a[i]
        a[i] = a[j]
        a[j] = tmp
        i = i - 1
        j = j + 1
    return a

Reverse a list of elements.


def swap(a, i, j):
    tmp = a[j]
    a[j] = a[i]
    a[i] = tmp

def reverse(a):
    i = 0
    while i < len(a) / 2:
        swap(a, i, j)
        i = i + 1

Reverse a list of elements.


def swap(a, i, j):
    tmp = a[j]
    a[j] = a[i]
    a[i] = tmp

def reverse(a):
    i = 0
    while i < len(a) / 2:
        swap(i, len(a) - i - 1)
        i = i + 1

Reverse a list of elements.


def swap(a, i, j):
    tmp = a[j]
    a[j] = a[i]
    a[i] = tmp

def reverse(a):
    i = 0
    while i < len(a) / 2:
        swap(a, i, len(a) - i - 1)
        i = i + 1

Reverse a list of elements.


def find_smallest_position(a, i):
    p = i
    j = i + 1
    while j < len(a):
        if a[i] < a[p]:
            p = j
        j = j + 1
    return p

def swap(a, i, j):
    tmp = a[j]
    a[j] = a[i]
    a[i] = tmp

def selection_sort(a):
    i = 0
    while i < len(a):
        p = find_smallest_position(a, i)
        swap(a, i, len(a) - i - 1)
        i = i + 1


def swap(a, i, j):
    tmp = a[j]
    a[j] = a[i]
    a[i] = tmp

def reverse(a):
    i = 0
    while i < len(a) / 2:
        swap(a, i, len(a) - i - 1)
    i = i + 1

Reverse a list of elements.


def reverse(a):
    i = 0
    j = len(a) - 1
    while i < len(a) / 2:
        tmp = a[j]
        a[j] = a[i]
        a[i] = tmp
        i = i + 1
        j = j - 1

Reverse a list of elements.


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp
    return a

def reverse(a):
    i = len(a) - 1
    j = 0
    while i != 0 and j < len(a) and j != i:
        swap()
        i = i - 1
        j = j + 1
    return a

Reverse a list of elements.


def find_smallest_position(a, i):
    p = i
    j = i + 1
    while j < len(a):
        if a[i] < a[p]:
            p = j
        j = j + 1
    return p

def swap(a, i, j):
    tmp = a[j]
    a[j] = a[i]
    a[i] = tmp

def selection_sort(a):
    i = 0
    while i < len(a):
        p = find_smallest_position(a, i)
        swap(a, i, p)
        i = i + 1


def find_smallest_position(a, i):
    p = i
    j = i + 1
    while j < len(a):
        if a[i] < a[p]:
            p = j
        j = j + 1
    return p

def swap(a, i, j):
    tmp = a[p]
    a[p] = a[i]
    a[p] = tmp

def selection_sort(a):
    i = 0
    while i < len(a):
        p = find_smallest_position(a, i)
        swap(a, i, p)
        i = i + 1


def find_smallest_position(a, i):
    p = i
    j = i + 1
    while j < len(a):
        if a[i] < a[p]:
            p = j
        j = j + 1
    return p

def swap(a, i, j):
    tmp = a[p]
    a[p] = a[i]
    a[i] = tmp

def selection_sort(a):
    i = 0
    while i < len(a):
        p = find_smallest_position(a, i)
        swap(a, i, p)
        i = i + 1


def find_smallest_position(a, i):
    p = i
    j = i + 1
    while j < len(a):
        if a[j] < a[p]:
            p = j
        j = j + 1
    return p

def swap(a, i, j):
    tmp = a[j]
    a[j] = a[i]
    a[i] = tmp

def selection_sort(a):
    i = 0
    while i < len(a):
        p = find_smallest_position(a, i)
        swap(a, i, p)
        i = i + 1


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp
    return a

def reverse(a):
    i = len(a) - 1
    j = 0
    while i != 0 and j < len(a) and j != i:
        swap(a, i, j)
        i = i - 1
        j = j + 1
    return a

Reverse a list of elements.


Reverse a list of elements.


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp

def reverse(a):
    i = 0
    while i < len(a) / 2:
        j = len(a) - 1 - i
        swap(a, i, j)
        i += 1
    return a

Reverse a list of elements.


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp
    return a

def reverse(a):
    i = 0
    while i < len(a) / 2:
        j = len(a) - 1 - i
        swap(a, i, j)
        i = i + 1
    return a

Reverse a list of elements.


def reverse(a):
    i = 0
    while i < len(a) / 2:
        j = len(a) - 1 - i
        tmp = a[i]
        a[i] = a[j]
        a[j] = tmp
        i += 1
    return a

Reverse a list of elements.


def swap(a, i, j):
    tmp = a[j]
    a[j] = a[i]
    a[i] = tmp

def selection_sort(a):
    i = 0
    while i < len(a):
        p = smallest(a, i)
        swap(a, i, p)
        i = i + 1


def swap(a, j, i):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp
    return a

def reverse(a):
    i = len(a) - 1
    j = 0
    while i != 0 and j < len(a) and j != i:
        swap(a, i, j)
        i = i - 1
        j = j + 1
    return a

Reverse a list of elements.


def swap(a, i, j):
    tmp = a[j]
    a[j] = a[i]
    a[i] = tmp

def smallest_position(a, i):
    p = i
    j = i + 1
    while j < len(a):
        if a[j] < a[p]:
            p = j
        j = j + 1
    return p

def selection_sort(a):
    i = 0
    while i < len(a):
        p = smallest_position(a, i)
        swap(a, i, p)
        i = i + 1


def selection_sort(a):
    while i < len(a):
        j = i + 1
        i = 0
        p = i
        while j < len(a):
            if a[j] < a[p]:
                p = j
            j = j + 1
        tmp = a[i]
        a[i] = a[p]
        a[p] = tmp
        i = i + 1
    return a


def selection_sort(a):
    i = 0
    while i < len(a):
        j = i + 1
        p = i
        while j < len(a):
            if a[j] < a[p]:
                p = j
            j = j + 1
        tmp = a[i]
        a[i] = a[p]
        a[p] = tmp
        i = i + 1
    return a


def swap(a, j, i):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp
    return a

def reverse(a):
    i = len(a - 1)
    j = 0
    while i != 0 and j < len(a) and j != i:
        swap(a, i, j)
        i = i - 1
        j = j + 1
    return a

Reverse a list of elements.


def swap(a, i, p):
    tmp = a[i]
    a[i] = a[p]
    a[p] = tmp

def selection_sort(a):
    i = 0
    while i < len(a):
        p = i
        j = i + 1
        while j < len(a):
            if a[j] < a[p]:
                p = j
            j = j + 1
        swap(a, i, p)
        i = i + 1
    return a


def reverse(a):
    i = 0
    while i < len(a) / 2:
        tmp = a[i]
        a[i] = a[len(a) - i - 1]
        a[len(a) - i - 1] = tmp
    i = i + 1
    return a

Reverse a list of elements.


def reverse(a):
    i = 0
    while i < len(a) / 2:
        tmp = a[i]
        a[i] = a[len(a) - i - 1]
        a[len(a) - i - 1] = tmp
        i = i + 1
    return a

Reverse a list of elements.


def reverse(a):
    tmp = a[len(a) - 1]
    a[len(a) - 1] = a[i]
    a[i] = tmp

Reverse a list of elements.


def selection_sort(a):
    i = 0
    while i < len(a):
        p = i
        j = i + 1
        while j < len(a):
            if a[j] > a[p]:
                p = j
            j += 1
        tmp = a[p]
        a[p] = a[i]
        a[i] = tmp
        i += 1
    return a


def reverse(a):
    tmp = a[len(a) - i - 1]
    a[len(a) - i - 1] = a[i]
    a[i] = tmp

Reverse a list of elements.


def reverse(a, i):
    tmp = a[len(a) - i - 1]
    a[len(a) - i - 1] = a[i]
    a[i] = tmp

Reverse a list of elements.


Reverse a list of elements.


def selection_sort(a):
    i = 0
    while i < len(a):
        p = i
        j = i + 1
        while j < len(a):
            if a[j] < a[p]:
                p = j
            j += 1
        tmp = a[p]
        a[p] = a[i]
        a[i] = tmp
        i += 1
    return a


def selection_sort(a, i):
    p = i
    j = i + 1
    while j < len(a):
        if a[j] < a[p]:
            p = j
        j = j + 1


def selection_sort(a):
    p = i
    j = i + 1
    while j < len(a):
        if a[j] < a[p]:
            p = j
        j = j + 1


def selection_sort(a):
    i = 0
    p = 1
    j = i + 1
    while j < len(a):
        if a[j] < a[p]:
            p = j
        j = j + 1


def selection_sort(a):
    i = 0
    p = 1
    j = i + 1
    while j < len(a):
        if a[j] < a[p]:
            p = j
        j = j + 1
        i = i + 1


def selection_sort(a):
    i = p
    p = i
    j = i + 1
    while j < len(a):
        if a[j] < a[p]:
            p = j
        j = j + 1


def swap(a, i, j):
    a[i], a[j] = a[j], a[i]
    return a

def reverse(a):
    i = 0
    while i < len(a) // 2:
        swap(a, i, len(a) - 1 - i)
        i = i + 1
    return a

Reverse a list of elements.


def selection_sort(a):
    i = 0
    while i < len(a):
        j = i
        smallest = j
        while j < len(a):
            if a[j] < a[smallest]:
                smallest = j
            j = j + 1
        a[i], a[smallest] = a[smallest], a[i]
        i = i + 1
    return a


def selection_sort(a):
    i = 0
    while i < len(a):
        p = i
        j = i + 1
        while j < len(a):
            if a[j] < a[p]:
                p = i
                tmp = a[p]
                a[p] = a[j]
                a[j] = tmp
            j = j + 1
        i = i + 1


def selection_sort(a):
    i = 0
    while i < len(a):
        p = i
        j = i + 1
        while j < len(a):
            if a[j] < a[p]:
                p = j
            j = j + 1
        tmp = a[p]
        a[p] = a[i]
        a[i] = tmp
        i = i + 1


def selection_sort(a):
    i = 0
    while i < len(a):
        p = i
        j = i + 1
        while j < len(a):
            if a[j] < a[p]:
                p = i
                tmp = a[p]
                a[p] = a[j]
                a[j] = tmp
            j += 1
        i += 1


def reverse(a):
    i = 0
    j = len(a)
    while i < len(a) / 2:
        tmp = a[i]
        a[i] = a[j]
        a[j] = tmp
        i = i + 1
        j = j - 1

Reverse a list of elements.


def reverse(a):
    i = 0
    j = len(a) - 1
    while i < len(a) / 2:
        tmp = a[i]
        a[i] = a[j]
        a[j] = tmp
        i = i + 1
        j = j - 1

Reverse a list of elements.


def reverse(a):
    i = 0
    j = len(a) - 1 - j
    while j < len(a):
        tmp = a[j]
        a[j] = a[i]
        a[i] = tmp
        i = i + 1
        j = j + 1
    return a

Reverse a list of elements.


def reverse(a):
    i = 0
    j = len(a) - 1
    while j < len(a):
        tmp = a[j]
        a[j] = a[i]
        a[i] = tmp
        i = i + 1
        j = j - 1
    return a

Reverse a list of elements.


def reverse(a):
    i = 0
    j = len(a) - 1
    while j < len(a) and len(a) > 0:
        tmp = a[j]
        a[j] = a[i]
        a[i] = tmp
        i = i + 1
        j = j - 1
    return a

Reverse a list of elements.


def reverse(a):
    i = 0
    j = len(a) - 1
    while j < len(a) and len(a) > 1:
        tmp = a[j]
        a[j] = a[i]
        a[i] = tmp
        i = i + 1
        j = j - 1
    return a

Reverse a list of elements.


def reverse(a):
    i = 0
    while i < len(a) / 2:
        tmp = a[i]
        a[i] = a[len(a) - i - 1]
        a[len(a) - i - 1] = tmp
        i = i + 1
        return a

Reverse a list of elements.


Reverse a list of elements.


def swap(a, i, j):
    while j < len(a) / 2:
        tmp = a[j]
        a[j] = a[i]
        a[i] = tmp
        j = j + 1
        i = i - 1
    return a

def reverse(a):
    j = 0
    i = len(a) - 1
    print(swap(a, i, j))

Reverse a list of elements.


def swap(a, i, j):
    while j < len(a) / 2:
        tmp = a[j]
        a[j] = a[i]
        a[i] = tmp
        j = j + 1
        i = i + 1
    return a

def reverse(a):
    j = 0
    i = len(a) - 1
    print(swap(a, i, j))

Reverse a list of elements.


def reverse(a):
    i = 0
    j = len(a) - 1
    while j < len(a) / 2:
        tmp = a[j]
        a[j] = a[i]
        a[i] = tmp
        i = i + 1
        j = j - 1
    return a

Reverse a list of elements.


def reverse(a):
    j = 0
    i = len(a) - 1

Reverse a list of elements.


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp

def reverse(a):
    i = 0
    j = len(a) - 1
    while i < len(a) / 2:
        swap(a, i, j)
        i += 1
        j = j - 1

Reverse a list of elements.


def reverse(a):
    i = 0
    j = len(a) - 1
    while i < len(a) / 2:
        tmp = a[j]
        a[j] = a[i]
        a[i] = tmp
        i = i + 1
        j = j - 1
    return a

Reverse a list of elements.


def reverse(a):
    tmp = a[len(a) - i - 1]
    a[len(a) - i - 1] = a[i]
    a[i] = tmp
    i = i + 1

Reverse a list of elements.


def reverse(a):
    i = 0
    while i < len(a) / 2:
        tmp = a[i]
        a[j] = a[i]
        a[i] = tmp
        i = i - 1

Reverse a list of elements.


def reverse(a):
    i = 0
    while i < len(a) / 2:
        tmp = a[i]
        a[j] = a[i]
        a[i] = tmp
        j = j + 1
        i = i - 1

Reverse a list of elements.


def swap(a, i, j):
    a[i], a[j] = a[j], a[i]

def reverse(a):
    i = 0
    while i < len(a) / 2:
        swap(a, i, len(a) - i - 1)
        i = i + 1

Reverse a list of elements.


def reverse(a):
    tmp = a[len(a) - 1]
    a[len(a) - 1] = a[i]
    a[i] = tmp
    i = i + 1

Reverse a list of elements.


def reverse(a):
    i = 0
    while i < len(a):
        j = len(a) - i - 1
        tmp = a[j]
        a[j] = a[i]
        a[i] = tmp
        i = i + 1
    return a

Reverse a list of elements.


def reverse(a):
    x = a[::-1]
    return x

Reverse a list of elements.


def reverse(a):
    i = 0
    j = len(a) - 1
    while i < len(a) / 2:
        tmp = a[i]
        a[j] = a[i]
        a[i] = tmp
        j = j - 1
        i = i + 1

Reverse a list of elements.


def reverse(a):
    j = 0
    i = len(a) - 1
    return j

Reverse a list of elements.


def reverse(a):
    j = 0
    i = len(a) - 1
    return j, i

Reverse a list of elements.


def reverse(a):
    i = 0
    j = len(a) - 1
    while i < len(a) / 2:
        tmp = a[i]
        a[i] = a[j]
        a[i] = tmp
        j = j - 1
        i = i + 1

Reverse a list of elements.


def reverse(a):
    i = 0
    j = len(a) - 1
    while i < len(a) / 2:
        tmp = a[i]
        a[i] = a[j]
        a[j] = tmp
        j = j - 1
        i = i + 1

Reverse a list of elements.


def swap(a, i, j):
    tmp = a[j]
    a[j] = a[i]
    a[i] = tmp

def find_smallest_position(a, i):
    p = i
    j = i + 1
    while j < len(a):
        if a[j] < a[p]:
            p = j
        j = j + 1
    return p

def selection_sort(a):
    i = 0
    while i < len(a):
        p = find_smallest_position(a, i)
        swap(a, i, p)
        i = i + 1


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp

def reverse(a):
    i = 0
    while i < len(a):
        swap(a, i, j)
        i = i + 1

Reverse a list of elements.


def swap(a, i, j):
    a[i], a[j] = a[j], a[i]

def smallest(a, i):
    minimum = i
    while i < len(a):
        if a[i] < a[minimum]:
            minimum = i
        i = i + 1

def selection_sort(a):
    i = 0
    while i < len(a):
        pos = smallest(a, i)
        swap(a, i, pos)
        i = i + 1


def swap(a, i, j):
    a[i], a[j] = a[j], a[i]

def smallest(a, i):
    minimum = i
    while i < len(a):
        if a[i] < a[minimum]:
            minimum = i
        i = i + 1
    return minimum

def selection_sort(a):
    i = 0
    while i < len(a):
        pos = smallest(a, i)
        swap(a, i, pos)
        i = i + 1


def reverse(a):
    j = 0
    i = len(a) - 1
    return a

Reverse a list of elements.


def reverse(a):
    return a[len(a) - 1:]

Reverse a list of elements.


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[i] = tmp

def reverse(a):
    i = 0
    j = len(a) - 1
    while i < len(a) / 2:
        swap(a, i, j)
        j = j - 1
        i = i + 1

Reverse a list of elements.


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp

def reverse(a):
    i = 0
    j = len(a) - 1
    while i < len(a) / 2:
        swap(a, i, j)
        j = j - 1
        i = i + 1

Reverse a list of elements.


Reverse a list of elements.


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp

def reverse(a):
    i = 0
    while i < len(a):
        j = len(a) - 1 - i
        swap(a, i, j)
        i = i + 1

Reverse a list of elements.


def reverse(a):
    i = 0
    j = len(a) - 1
    while j > len(a) / 2:
        tmp = a[j]
        a[j] = a[i]
        a[i] = tmp
        i += 1
        j = j - 1

Reverse a list of elements.


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp

def reverse(a):
    while i < len(a):
        swap(a, i, j)
        i = i + 1

Reverse a list of elements.


def swap(a, i, j):
    temp = a[i]
    a[i] = a[j]
    a[j] = a[i]

def reverse(a):
    i = 0
    j = len(a) - 1
    while i < j:
        swap(a, i, j)
        i = i + 1
        j = j - 1

Reverse a list of elements.


def reverse(a):
    i = 0
    while i < len(a):
        a[i] = a[i - 1]
        i = i + 1

Reverse a list of elements.


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp

def reverse(a):
    i = 0
    while i < len(a) / 2:
        j = len(a) - 1 - i
        swap(a, i, j)
        i = i + 1

Reverse a list of elements.


def reverse(a):
    i = 0
    return a[len(a) - i]
    i = i + 1

Reverse a list of elements.


def swap(a, i, j):
    temp = a[i]
    a[i] = a[j]
    a[j] = temp

def reverse(a):
    i = 0
    j = len(a) - 1
    while i < j:
        swap(a, i, j)
        i = i + 1
        j = j - 1

Reverse a list of elements.


def reverse(a):
    i = 0
    j = len(a) - 1
    while j > len(a) / 2:
        tmp = a[i]
        a[i] = a[j]
        a[j] = tmp
        i += 1
        j = j - 1

Reverse a list of elements.


def swap(a, i, j):
    tmp = a[j]
    a[j] = a[i]
    a[i] = tmp
    return a

def reverse(a):
    i = 0
    while i < len(a) / 2:
        j = len(a) - i - 1
        swap(a, i, j)
        i = i + 1
    return a

Reverse a list of elements.


def reverse(a):
    i = 0
    return a[len(a) - i - 1]
    i = i + 1

Reverse a list of elements.


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp

def reverse(a):
    i = 0
    j = len(a)
    while i < len(a):
        swap(a, i, j)
        i = i + 1
        j = j - 1

Reverse a list of elements.


def reverse(a):
    i = 0
    while i < len(a):
        return a[len(a) - i - 1]
        i = i + 1

Reverse a list of elements.


def swap(a, i, j):
    tmp = a[j]
    a[j] = a[i]
    a[i] = tmp

def reverse(a):
    i = 0
    j = len(a) - 1
    while j > len(a) / 2:
        tmp = a[i]
        a[i] = a[j]
        a[j] = tmp
        i += 1
        j = j - 1

Reverse a list of elements.


def swap(a, i, j):
    tmp = a[i]
    a[i] = a[j]
    a[j] = tmp

def reverse(a):
    i = 0
    j = len(a) + 1
    while i < len(a):
        swap(a, i, j)
        i = i + 1
        j = j - 1

Reverse a list of elements.


def reverse(a):
    i = 0
    while i < len(a) / 2:
        j = len(a) - i - 1
        tmp = a[j]
        a[j] = a[i]
        a[i] = tmp
        i = i + 1
    return a

Reverse a list of elements.