newbie seeks advise.
dwelch91 at nospam.attbi.com
Fri Sep 20 01:46:31 EDT 2002
> I've been learning python for about a month. I had no prior knowledge
> of programming.
> My question is, I have a tuple which is, data = (69, 40, 74, 41, 56,
> 57, 38, 58, 26, 55). How I can make a function that picks up a largest
> from this "data" tuple. If "data" was a 'List' I would be able to
> use "sort" but since sort doesn't work with tuple. I am stuck here.
> Thanks in advance
Simple way, probably not optimal:
>>> max_element = max(list(data))
More information about the Python-list