Using numpy you could do this in a single line:
import numpy as np
lst = [29, 64, 65, 66, 128, 129, 130, 166, 167, 168, 184, 185, 186, 215, 216, 217, 237, 238, 239, 349, 350, 351, 443, 483, 484, 485, 495, 496, 497, 526, 527, 528, 542, 543, 544, 564, 565, 566]
[x.tolist() for x in np.split(lst, np.where(np.diff(lst) > 1)[0]+1)]
Output:
[[29],
[64, 65, 66],
[128, 129, 130],
[166, 167, 168],
[184, 185, 186],
[215, 216, 217],
[237, 238, 239],
[349, 350, 351],
[443],
[483, 484, 485],
[495, 496, 497],
[526, 527, 528],
[542, 543, 544],
[564, 565, 566]]
Edit 1: To store each list to separate variables (Not Recommended)
sub_lists = [x.tolist() for x in np.split(lst, np.where(np.diff(lst) > 1)[0]+1)]
for i in range(1, len(sub_lists)+1):
globals()['list_%s' % i] = sub_lists[i-1]
Output:
print(list_1)
>> [29]
print(list_2)
>> [64, 65, 66]
Note:
It is not recommended to have individual variables for multiple reasons, especially in the scenarios where the number of variables can explode based on the condition.