I have several lists that are structured as follows
list_01= [['Little Line', '15']]
list_02= [['Long Line', '20']]
Later on in the code after these lists I want to create a function that defines the creation of lines that I want to work as follows. If the items in the list equal the strings 'Little Line' and '15', it will create a little line.
def draw_line(dataset):
if dataset[0[0]]==('Little Line'):
left(dataset[0[1]])
foward(25)
Later, I can then call this function as follows later on in the code:
draw_line(list_01)
to create the line. The code I've described is pretty similar to my current code and shows how I believe it should work. I understand this should probably be pretty basic code, but I'm experiencing errors and can't quite figure out how it should work.