5 comments:

  1. This comment has been removed by the author.

    ReplyDelete
  2. This comment has been removed by the author.

    ReplyDelete
  3. def sor(a,t):
    print a
    for i in range(1,t):
    for j in range(0,t-i):
    if a[j]<a[j+1]:
    temp=a[j]
    a[j]=a[j+1]
    a[j+1]=temp
    print a
    mylist=[43,5,4,23,4,45,5,655]
    s=len(mylist)
    sor(mylist,s)
    [43, 5, 4, 23, 4, 45, 5, 655]
    [655, 45, 43, 23, 5, 5, 4, 4]

    ReplyDelete
  4. mylist=[1,2,3,4,5,6]
    mylist.sort(reverse=True)
    print mylist

    ReplyDelete
  5. mylist=[2,4,6,8,10]
    mylist sort(reverse=true)
    print "mylist"

    [2,4,6,8,10]
    [10,8,6,4,2]

    ReplyDelete