擅长:python、mysql、java
<p>列表索引以0开头,应使用范围(0,len(list)-1)。在</p>
<pre><code>def change_position(lst3, lst4):
if len(lst3) != len(lst4):
print(False)
else:
lst3[0] = lst4[len(lst4)-1]
def cyclic(lst1, lst2):
if len(lst1) != len(lst2):
print(False)
else:
for i in range(len(lst1)-1):
if change_position(lst1, lst2):
print(True)
else:
print(False)
</code></pre>