Using the function provided, write a function that decides whether two lists are "identical". That is, if cycling by any number N makes the lists identical, the function should return True, otherwise, it should return False. for example identical([1,2,3,4,5], [5,4,1,2,3,]) should give True and identical([1,2,3,4,5], [1,2,3,5,4]) should give False.
Using the function provided, write a function that decides whether two lists are "identical". That is, if cycling by any number N makes the lists identical, the function should return True, otherwise, it should return False.
for example identical([1,2,3,4,5], [5,4,1,2,3,]) should give True and identical([1,2,3,4,5], [1,2,3,5,4]) should give False.
![](/static/compass_v2/shared-icons/check-mark.png)
Step 1: Define the function identical() which takes two lists as arguments.
Step 2: Check whether the length of the lists are not equal.
Step 3: If it is true, then return False.
Step 4: Check whether the lists are equal. If the condition is true, then return True.
Step 5: Generate new list by cycling the elements one at a time and check whether it matches the other list.
Step 6: If the condition is true, then return True.
Step 7: After checking all possibilities, if there is no match, then return False.
Step by step
Solved in 4 steps with 2 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![C How to Program (8th Edition)](https://www.bartleby.com/isbn_cover_images/9780133976892/9780133976892_smallCoverImage.gif)
![Database Systems: Design, Implementation, & Manag…](https://www.bartleby.com/isbn_cover_images/9781337627900/9781337627900_smallCoverImage.gif)
![Programmable Logic Controllers](https://www.bartleby.com/isbn_cover_images/9780073373843/9780073373843_smallCoverImage.gif)