Pythonでクイックソートのパーティション関数を実装しようとしています。
def partition(ls):
  if len(ls) == 0:
    return
  pivot = ls[0]
  i, j = 1
  while j < len(ls):
    if ls[j] <= pivot:
      i += 1
      temp = ls[i]
      ls[i] = ls[j]
      ls[j] = temp
    j += 1
  ls[0] = ls[i]
  ls[i] = pivot
ただし、Pythonを呼び出すと、このエラーが発生しますquicksort.partition([1,2,3])。
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "quicksort.py", line 5, in partition
    i, j = 1
TypeError: 'int' object is not iterable
このエラーは何を言っていますか?もちろん、intオブジェクトは反復可能ではありませんが、intオブジェクトを反復処理したのはいつですか。