Jabber/XMPP conference bot & framework
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
#!/usr/bin/python
|
|
|
|
def sortiere(liste):
|
|
if len(liste)==1:
|
|
pivot = liste[0]
|
|
return [liste[0]]
|
|
elif len(liste)==0:
|
|
return []
|
|
pivot = liste[0]
|
|
return sortiere([x for x in liste[1:] if x<= pivot]) + \
|
|
[pivot] + \
|
|
sortiere([x for x in liste[1:] if x> pivot])
|
|
|
|
print sortiere([2,3,4,1,2,8,9])
|
|
|