Driver code
if __name__ == ' _ _ main _ _ ' : NEW_LINE INDENT head = None NEW_LINE head = push ( head , 70 ) NEW_LINE head = push ( head , 60 ) NEW_LINE head = push ( head , 50 ) NEW_LINE head = push ( head , 40 ) NEW_LINE head = push ( head , 30 ) NEW_LINE head = push ( head , 20 ) NEW_LINE head = push ( head , 10 ) NEW_LINE tmp = head NEW_LINE print ( " Given ▁ List : ▁ " , end = " " ) NEW_LINE while ( tmp != None ) : NEW_LINE INDENT print ( tmp . data , end = " ▁ " ) NEW_LINE tmp = tmp . next NEW_LINE DEDENT print ( ) NEW_LINE m = 3 NEW_LINE n = 6 NEW_LINE k = 2 NEW_LINE print ( " After ▁ rotation ▁ of ▁ sublist : ▁ " , end = " " ) NEW_LINE rotateSubList ( head , m , n , k ) NEW_LINE DEDENT