I'm new to python and programming in general, so I feel like I'm trying to wrap my head around the simplest of things...
Let's say I have a list of 12 items:
a = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12] and a variable that matches one of the items in the list:
b = 7 Now I want to find that match in the list and move every item before the match to the end of the list in the same order like so:
a = [7, 8, 9, 10, 11, 12, 1, 2, 3, 4, 5, 6] How would I go about doing this in python 3.4.2?
The match could be for any item at any index, but the number of items will always be the same (12).