Problem with for-loop in python
- by Protean
This code is supposed to be able to sort the items in self.array based upon the order of the characters in self.order. The method sort runs properly until the third iteration, unil for some reason the for loop seems to repeat indefinitely. What is going on here?
class sorting_class:
def __init__(self):
self.array = ['ca', 'bd', 'ac',…