Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

Stackorigin – The Community of Question and Answers

Stackorigin – The Community of Question and Answers Logo Stackorigin – The Community of Question and Answers Logo
Search
Ask A Question

Mobile menu

Close
Ask a Question
Home/ Questions/Q 339
Next
In Process
pratap
  • 0
pratap
Asked: October 20, 20202020-10-20T13:58:24+00:00 2020-10-20T13:58:24+00:00In: Programming

What is difference between sort and sorted in python?

  • 0

What is difference between sort and sorted in Python?

sortsorted
  • 1 1 Answer
  • 90 Views
  • 0 Followers
  • 0
Share
  • Facebook

    Related Questions

    • Best REST API Books in 2022
    • How Check Java Version In Windows
    • how to create an IAM user in AWS
    • Error message "Forbidden You don't have permission to access / on this server"
    • Unable to delete S3 bucket
    • Check javascript version
    • How much data can I store in a Python dictionary
    • Best JSON viewer Tools Compared for Developers
    • 5 Essential Skills Every Web Developer should Know
    • Python - List Comprehension

    Leave an answer
    Cancel reply

    You must login to add an answer.

    Forgot Password?

    Need An Account, Sign Up Here

    1 Answer

    • Voted
    • Oldest
    • Recent
    1. pratap
      2021-03-06T06:04:37+00:00Added an answer on March 6, 2021 at 6:04 am
      This answer was edited.

      sorted() and sort() methods sort the given sequence in either ascending or descending order.

      Sorted(): This method doesn’t change the original list.
      Sort(): This method makes changes to the original sequence.
      # based on alphabetical order of first letter
      courts=[“Supreme”,”High”,”District”]
      print(” the original list :”,courts)

      # using sorted()
      new_list=sorted(courts)
      print(“using_sorted():”,new_list)#returns a sorted list
      print(“aft_sorting_lst”,courts)#doesn’t change original list

      #using sort()
      k=courts.sort()
      print(“using_sort():”,k)#returns Nothing
      print(“aft_sort_lst:”,courts) #changes the original list

      • 0
      • Reply
      • Share
        Share
        • Share on Facebook
        • Share on Twitter
        • Share on LinkedIn
        • Share on WhatsApp

    Sidebar

    Ask A Question

    Recent Posts

    • thestackorigin@gmail.com

      How to Download and Install Postman on Windows

      • 0 Comments
    • thestackorigin@gmail.com

      How to Install Angular on Windows

      • 0 Comments
    • thestackorigin@gmail.com

      Get list of IAM users and their groups, policies using ...

      • 0 Comments
    • thestackorigin@gmail.com

      Python Sending Email using SMTP

      • 0 Comments
    • thestackorigin@gmail.com

      Bitbucket Cloud recently stopped supporting account passwords for Git authentication

      • 0 Comments

    Adv 120x600

    Looking for advertising?

    Adv 120x600

    Looking for advertising?
    • Random
    • Answers
      • On: December 30, 2020
      • Answer: 1

      how to stop hair fall?

      • On: April 4, 2022
      • Answer: 1

      Turn Bluetooth on or off in Windows

      • On: April 28, 2022
      • Answers: 0

      In Summer which category of cloth do you prefer?

      • On: February 15, 2022
      • Answer: 1

      How do I request a new debit card from SBI?

      • On: February 26, 2021
      • Answers: 0

      How to deactivate JioTunes service?

    • sam
      sam added an answer I understand this issue is resolved but I happened to… August 10, 2022 at 2:28 am
    • sam
      sam added an answer If you are using a WAMP server then try this: Single click… August 10, 2022 at 2:26 am
    • Jagadeeshp
      Jagadeeshp added an answer I successfully deleted my bucket by changing the "Action": "Deny"… August 10, 2022 at 2:20 am
    • Jagadeeshp
      Jagadeeshp added an answer Unable to delete S3 bucket You are not able to… August 10, 2022 at 2:19 am
    • jacknilles
      jacknilles added an answer Why make edible glitter, buy Magic Sparkles edible glitters that… August 5, 2022 at 10:21 am

    Adv 120x600

    Looking for advertising?

    Trending Categories

    Health
    1996Questions
    , 3Followers
    Programming
    938Questions
    , 0Followers
    Technology
    212Questions
    , 3Followers
    General Knowledge
    131Questions
    , 0Followers
    Business & Finance
    82Questions
    , 4Followers

    Stats

    • Questions 3k
    • Answers 1k
    • Best Answers 90
    • Users 90

    Explore

    • Recent Questions
    • Most Answered
    • Answers
    • No Answers
    • Most Visited
    • Most Voted
    • Random
    • Polls

    Footer

    Stackorigin - The Community of Question and Answers

    Discy

    Stackorigin is the world’s largest Q&A networking site, Stackorigin community brings you the collaboration of all the various Questions and the related Answers given by the community.

    About

    • About Us
    • Contact Us
    • FAQ
    • Submit Guest Post Article on Technology, Education, Health, Apps, Gadgets, IoT, AI, Business, Digital Marketing and More

    Info

    • Privacy Policy
    • Terms and Conditions
    • Community Guidelines
    • Tags

    Products

    • Tutorials
    • Advertising
    • Categories
    • Corona
    • StackHow

    Follow

    © 2022 Stackorigin. All Rights Reserved.

    Insert/edit link

    Enter the destination URL

    Or link to existing content

      No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.