# Specification: overhand(L, r=1) is yet another shuffling algorithm,
# like scramble() and randInsert(). Inspired by the (physical)
# overhand shuffle, the algorithm repeatedly performs a three-segment
# reordering of the deck as follows. First, pick two indexes at
# random; call the lesser one i and the larger one j (note your code
# should also work for i==j). Exchange the first i elements of L with
# the last len(L)-j elements of L. So, for example, if the list is
# initially
# [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
# and i=3, j=8, we would restructure the list as follows:
# [0, 1, 2 | 3, 4, 5, 6, 7 | 8, 9]
# to yield
# [8, 9, 3, 4, 5, 6, 7, 0, 1, 2]
# To shuffle perform this operation r (default 1) times.
#
# Example:
# >>> L=list(range(10))
# >>> L
# [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
# >>> overhand(L)
# [4, 5, 6, 7, 8, 9, 2, 3, 0, 1]
# >>> overhand(L, 100)
# [6, 2, 4, 9, 8, 0, 5, 1, 7, 3]
#
# Hint: Careful! The two sections you swap may not be the same
# length. To avoid going crazy, I'd avoid parallel assignment to start
# with, as it may not operate the way you might expect it to. This one
# is tricky!
#
from random import randint
def overhand(L, r=1):
pass