[issue38012] Python Fuction min is case sentive ?
Pavan Kumar Uppalanchu
report at bugs.python.org
Mon Sep 2 14:13:03 EDT 2019
Pavan Kumar Uppalanchu <uppalanchupavankumar45 at gmail.com> added the comment:
Hello Karthikeyan,
Thank you very much for your valuable explanation.
Regards,
Pavan Uppalanchu
On Mon, Sep 2, 2019 at 11:28 PM Karthikeyan Singaravelan
<report at bugs.python.org> wrote:
>
>
> Karthikeyan Singaravelan <tir.karthi at gmail.com> added the comment:
>
> Here min uses the ASCII value of the letters for comparison. So for 'Infinity' 'I' (73) has the lowest value and for 'inFinity' 'F' (70) has the lowest value as seen below.
>
> >>> list(map(lambda c: (c, ord(c)), 'Infinity'))
> [('I', 73), ('n', 110), ('f', 102), ('i', 105), ('n', 110), ('i', 105), ('t', 116), ('y', 121)]
> >>> list(map(lambda c: (c, ord(c)), 'inFinity'))
> [('i', 105), ('n', 110), ('F', 70), ('i', 105), ('n', 110), ('i', 105), ('t', 116), ('y', 121)]
>
> ----------
> nosy: +xtreak
>
> _______________________________________
> Python tracker <report at bugs.python.org>
> <https://bugs.python.org/issue38012>
> _______________________________________
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue38012>
_______________________________________
More information about the Python-bugs-list
mailing list