Here is the set of data,
obj = [[A, B, 2], [D, A, 5] ,[B, C, 3]]
I would like to store this in the following class object
class Map():
def __init__(self,start,destination,cost):
self.start = start
self.destination = destination
self.cost = cost
I would like to store the obj in something like below with for loop
obj[0].start = A
obj[0].destination = B
obj[0].cost = 2
....
obj[2].start = B
obj[2].destination = C
obj[2].cost = 3
Anyone can help?