Python Exercise Example68
# Python2.x Python Exercise Instance 68
[ Python 100 Examples](#)
**Title:** There are n integers, shift the preceding numbers backward by m positions sequentially, and the last m numbers become the first m numbers.
**Program Analysis:** None.
Program source code:
## Instance
#!/usr/bin/python# -*- coding: UTF-8 -*-if __name__ == ' __main__ ': n = int(raw_input('integer n is:n'))m = int(raw_input('shift backward m positions to:n'))def move(array,n,m): array_end = arrayfor i in range(n - 1,-1,- 1): array = arrayarray = array_end m -= 1 if m>0:move(array,n,m)number = []for i in range(n): number.append(int(raw_input
YouTip