Question
How to extract sublists from a list, each sublist is extracted with an upper and lower edge being a specific item in the list.
Example 1
Input
Sublist_Slicing_edge = 0
mylist = [0,1,0,1,-1,-1,-2,1,2,3,4,0]
Desired Output
list1 = [0,1,0]
list2 = [0,1,-1,-1,-2,1,2,3,4,0]
Example 2
Input
Sublist_Slicing_edge = "I"
mylist = ["I" , "am" , "an" , "Engineer" , "and" , "I" , "am", "also","a" , "Scientist","!","But","I","am","not","a","Mathmatician"]
Desired Output
list1 = ["I" , "am" , "an" , "Engineer" , "and" , "I"]
list2 = ["I" , "am", "also","a" , "Scientist","!","But","I"]