I've just started using python in my computer technology class. One thing I can't figure out is how to have python put the lists inside a string into alphabetical order. If anyone has any easy answer, it will be much appreciated. Also, my teacher told me he would give extra credit if I use bubblesort.
pinbustersrule
0
Unverified User
Recommended Answers
Jump to PostI don't understand your question entirely, but there is a Python snippet at:
http://www.daniweb.com/code/snippet452.html
that looks at various sorting algorithms, including the ever so slow bubblesort.
Jump to PostDo you know about Python's built in sort? Try
print this_list.sort()
Bubble sorts are pretty straight forward btw.
Jump to PostIt's your extra credit, not mine. You'll have to come up with some code to start with or at least some ideas.
All 9 Replies
vegaseat
1,735
DaniWeb's Hypocrite
Team Colleague
pinbustersrule
0
Unverified User
pinbustersrule
0
Unverified User
woooee
814
Nearly a Posting Maven
pinbustersrule
0
Unverified User
woooee
814
Nearly a Posting Maven
pinbustersrule
0
Unverified User
jrcagle
77
Practically a Master Poster
noonecares
0
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.