BUG in MAX() - Documentation is not properly validate
Hello Team, This is Nil from India. I have found the issue in the MAX() function during the use of tuples. currently using the 3.8 version. need a clarification of that function i am attaching the code herewith: tpl=("Souradeepdey","Nabin","SouradeepDey","subhankardas","Nilkanthachatterjee","Subhankar") print(max(tpl)) print(min(tpl)) MAX Output: Subhankardas Waiting for a reply. Regards: Nilkantha Chatterjee
On Sat, Sep 17, 2022 at 2:16 PM Nilkantha Chatterjee VU3ZHA <vu3zha@gmail.com> wrote:
Hello Team, This is Nil from India.
I have found the issue in the MAX() function during the use of tuples. currently using the 3.8 version.
need a clarification of that function i am attaching the code herewith:
tpl=("Souradeepdey","Nabin","SouradeepDey","subhankardas","Nilkanthachatterjee","Subhankar")
print(max(tpl))
print(min(tpl))
MAX Output: Subhankardas
Waiting for a reply.
Hi Nil, The docs@ mailing list isn't the best place to look for help; this list is meant for reporting problems with the documentation, not usage questions or reports of problems with the behavior of Python. It would be better to ask questions like this in the `Help` section of discuss.python.org. When you re-ask this question there, please be a bit clearer; in this email you show the output of `max(tpl)` being `"Subhankardas"`, but that is not one of the options in `tpl`, and `max` will not create its own entries :). However, `"subhankardas"` *is* in `tpl`, and lowercase letters are sorted "bigger" than uppercase letters, so the output of `max(tpl)` should be `"subhankardas"`. You can see a bit better what's going on by looking at `sorted(tpl)`. Hope this helps, -- Zach
Noted with thanks. On Mon, 19 Sep 2022, 6:45 pm Zachary Ware, <zachary.ware+pydocs@gmail.com> wrote:
On Sat, Sep 17, 2022 at 2:16 PM Nilkantha Chatterjee VU3ZHA <vu3zha@gmail.com> wrote:
Hello Team, This is Nil from India.
I have found the issue in the MAX() function during the use of tuples. currently using the 3.8 version.
need a clarification of that function i am attaching the code herewith:
tpl=("Souradeepdey","Nabin","SouradeepDey","subhankardas","Nilkanthachatterjee","Subhankar")
print(max(tpl))
print(min(tpl))
MAX Output: Subhankardas
Waiting for a reply.
Hi Nil,
The docs@ mailing list isn't the best place to look for help; this list is meant for reporting problems with the documentation, not usage questions or reports of problems with the behavior of Python. It would be better to ask questions like this in the `Help` section of discuss.python.org. When you re-ask this question there, please be a bit clearer; in this email you show the output of `max(tpl)` being `"Subhankardas"`, but that is not one of the options in `tpl`, and `max` will not create its own entries :). However, `"subhankardas"` *is* in `tpl`, and lowercase letters are sorted "bigger" than uppercase letters, so the output of `max(tpl)` should be `"subhankardas"`. You can see a bit better what's going on by looking at `sorted(tpl)`.
Hope this helps, -- Zach
participants (2)
-
Nilkantha Chatterjee VU3ZHA
-
Zachary Ware