Code: Alles auswählen
# maxwert
pos=[(179, 102), (281, 102), (382, 102), (484, 102), (0, 0), (102, 500)]
wertx=0
werty=0
for x,y in pos:
if x > wertx:
wertx = x
if y > werty:
werty = y
maxwert = (wertx,werty)
print maxwert
Code: Alles auswählen
# maxwert
pos=[(179, 102), (281, 102), (382, 102), (484, 102), (0, 0), (102, 500)]
wertx=0
werty=0
for x,y in pos:
if x > wertx:
wertx = x
if y > werty:
werty = y
maxwert = (wertx,werty)
print maxwert
Code: Alles auswählen
print max(t[0] for t in pos), max(t[1] for t in pos)
Code: Alles auswählen
maxwert=map(max,zip(*pos))