To write a python program to circulate the n variables using function concept
PC Anaconda - Python 3.7
Define a function.
Get the list from the user.
Get the value from the user for the number of rotation
Using the slicing concept rotate the list
Print the list.
End the program
''' Circulate the n variables
Developed by: PRAJAN P
Register number:212223240121
'''
def circulate():
list=eval(input())
n=int(input())
print("After circulating the values are:",list[n: ]+list[ :n])
Thus the program to circulate the n variables using function is written and verified using python programming.