python add number to list and sort it code example Example: python insert sorted import bisect a = [1, 2, 4, 5] bisect.insort(a, 3) print(a)