To write a python program to circulate the n variables using function concept
PC Anaconda - Python 3.7
Get the two values from the user
Assign the value of second variable to a temporary variable
Get the value from the user for the number of rotation
Using the slicing concept rotate the list
Assign the value of second variable to a temporary variable
End program
#Program to circulate N values.
#Developed by: PREM KUMAR K
#RegisterNumber:21222230111
def circulate():
list1=eval(input())
n=int(input())
result=list1[n:]+list1[:n]
print("After circulating the values are:",result)
The output for circulate the values of n variables is successfull