擅长:python、mysql、java
<p>如果您的意思是列表中的同一个索引位,可以尝试以下操作:</p>
<pre><code>def minimumMoves(a, m):
# Write your code here
a = [4321, 3211]
m = [5432, 4302]
total = 0
# iterate the array of a and m together
for i, j in zip(a, m):
# means how many steps to turn i into j
total += abs(i - j)
return total
</code></pre>
<p>如果你有进一步的问题和意见,希望你能有所帮助。:)</p>