If you come from other programming languages, you may not be familiar with the concept of assigning multiple variables using a single operator.
Here is what happens here.
II i x, y = 3, 4, then x will have a value of 3, and y will have a value of 4
in this case
arr[j], arr[j+1] = arr[j+1], arr[j] can be rewritten as
arr[j] = arr[j+1]
arr[j+1] = arr[j]
( , @Dimitar).
temp = arr[j]
arr[j] = arr[j+1]
arr[j+1] = temp
, ,