Paul, You may want to read this:
https://docs.python.org/3/howto/sorting.html sorted() and .sort() have different behaviors, maybe you are looking for a particular case. .sort() will modify in place and printing that variable after the method call should show a sorted list. Jason On Tue, Jul 27, 2021 at 10:38 AM Paul Maxwell <drummermajor2...@gmail.com> wrote: > Hi all i am very new to Python and juypter notebook. i am trying to use > the sort function with a list of names, however when i use ( > *names.sort()* > *and then i print names i just get the same result the names have not been > sorted?* > i must be doing something wrong but ii thnk i need help? > > -- > You received this message because you are subscribed to the Google Groups > "Project Jupyter" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to jupyter+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/jupyter/181ab2e2-4f46-4fb9-a2f0-1947e4f53151n%40googlegroups.com > <https://groups.google.com/d/msgid/jupyter/181ab2e2-4f46-4fb9-a2f0-1947e4f53151n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "Project Jupyter" group. To unsubscribe from this group and stop receiving emails from it, send an email to jupyter+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jupyter/CAP7f1AiEO9LPGB8jpszUkG9uYxn%3DYk17SsBCr807iCaM0Cxnfw%40mail.gmail.com.