I am a beginner in Python classes and OOP in general.
I have a class like this:
class TSP():
cities=None
def __init__(self):
df = pd.read_excel('order data.xlsx')
self.cities = df.copy()
def something():
#####Do something###########
tsp = TSP()
tsp.something()
Now instead of just simply passing an excel file, I hope to implement a loop so that my program takes a file, runs everything, then takes another file, reruns everything, and so on and so forth.
Now, I am not sure how to implement this concept inside a class. Normally, I would have just placed my whole code inside a loop to get different files and run the code, but not sure how to do it in Classes.