Hello, I’ve learnt Merge sort using recursion by python. And I want to write Merge sort without recursion but I get error at line 21: TypeError: ‘set’ object is not subsciptable.

```
def merge(left, right):
result = []
while (left and right):
if left[0] < right[0]:
result.append(left[0])
left.pop(0)
else:
result.append(right[0])
right.pop(0)
if left:
result += left
if right:
result += right
return result
def its_magic(list,k):
result = []
while len(list)>=2*k:
result += merge(list[0:k],list[k:2*k])
if len(list) == 2*k:
list = []
else:
list = list[2*k:]
if not list:
return result
elif len(list) < k:
result += list
return result
return result + merge(list[0:k],list[k:])
def merge_sort(list):
i = 1
result = []
while i<len(list):
result = its_magic(list,i)
i*=2
return result
a = {5,2,4,5,613,43,534,53,12,4,6,88}
print(merge_sort(a))
```