I've been playing with bisect and I'm confused with the following behaviour:
Input:
test = 1
print(test)
bisect.insort([test], 6)
Output:
1
1
If I change when I define test as a list, I get a different response:
Input:
test = [1]
print(test)
bisect.insort(test, 6)
Output:
[1]
[1, 6]
Why does it do this?