New submission from lovelygoo2 <smergibblegibber...@usa.com>: >>> max(['34', '7']) '7' >>> #This happens because it is comparing strings. >>> #I have found a way to fix it though. >>> def Max(li): ... greatest=li[0] ... for item in li: ... for item2 in li: ... if int(item)<int(item2) or int(item)<greatest: ... break ... else: ... greatest=int(item) ... return(greatest)
---------- components: IDLE messages: 92920 nosy: lovelygoo2 severity: normal status: open title: Max() Not Working Properly versions: Python 3.1 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue6955> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com