ich schon wieder.
Mal eine Frage zur Performance von Python:
Stellen wir uns eine Maschine vor, die 1 Teil A,1 Teil B und 1 Teil C braucht um 1 Teil X zu produzieren.
Wie speichere ich das performancetechnsich besser ab:
Code: Alles auswählen
input = [[teilA,1][teilB,1],[teilC]]
for x,y in input:
print x
#...dosth...
Code: Alles auswählen
class Input:
def _init__(self,x,y)
self.Teil=x
self.Menge=y
input=[Input(teilA,1),Input(teilB,2),Input(teilC,3)]
for x in input:
print x.Teil
#...dosth...
Danke und Gruß