Skip to content
Snippets Groups Projects
2.7 Exercises.py 174 B
Newer Older
# question 1
Michael Mutote's avatar
Michael Mutote committed
def rotateR(val):
Michael Mutote's avatar
Michael Mutote committed
    return val[-1] + val[1:len(val)-1] + val[0]
Michael Mutote's avatar
Michael Mutote committed


Michael Mutote's avatar
Michael Mutote committed
# question 4
def rotateRx(val):
Michael Mutote's avatar
Michael Mutote committed
    val[0], val[-1] = val[-1], val[0]


# question 5
Michael Mutote's avatar
Michael Mutote committed