Let us discuss the various implementations of theFIBONACCIBUTTSORT.
Name:
Anonymous2010-07-23 4:24
FIOC: butt = raw_input('Sting to butt sort: ')
sortedbutt = '[b][i]'
tag = 'u'
for char in butt:
if char == ' ': # space does not use tag
sortedbutt += ' '
else:
sortedbutt += '[' + tag + ']' + char + '[/' + tag + ']'
tag = {'u': 'o',
'o': 'u'}[tag] # switch tag