Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
list and sort query
#1
qwe=[1,2,3,9,8,7,6]

qwe.sort()
print(qwe)

# This give output [1, 2, 3, 6, 7, 8, 9]

BUT

print(qwe.sort())

# This give output None

Why please..
Reply


Messages In This Thread
list and sort query - by arian29 - Sep-18-2019, 02:55 PM
RE: list and sort query - by perfringo - Sep-18-2019, 03:15 PM
RE: list and sort query - by ndc85430 - Sep-18-2019, 06:19 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How to sort a list with duplicates and return their unique indices. Echoroom 3 3,540 Sep-23-2022, 07:53 AM
Last Post: deanhystad
  sorting a list using unicodes acending order, no loops, no sort(), using recursion lrn2codee 14 6,470 Jun-23-2021, 07:33 PM
Last Post: deanhystad
  how to sort a list without .sort() function letmecode 3 3,472 Dec-28-2020, 11:21 PM
Last Post: perfringo
  [split] Manual Sort without Sort function fulir16 2 3,198 Jun-02-2019, 06:13 AM
Last Post: perfringo
  Manual Sort without Sort function dtweaponx 26 49,138 Jun-01-2019, 06:02 PM
Last Post: SheeppOSU
  Query in list.clear (beginner) Shaswat 1 1,928 Apr-30-2019, 01:54 PM
Last Post: ichabod801
  sort a list alphabeticaly without changing the original list Holmen 5 4,235 Jan-27-2019, 01:49 PM
Last Post: Holmen
  bubble sort random list atux_null 7 7,938 Nov-03-2017, 07:28 PM
Last Post: sparkz_alot

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020