Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Fibonacci Butt Sort

Name: Anonymous 2009-08-16 23:08

Let us discuss the various implementations of theFIBONACCI BUTT SORT.

Name: Anonymous 2010-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

sortedbutt += '[/i][/b]'
print sortedbutt


Befunge:
vu                   >:" "`!#v_ "[",10g,"]",,"[","/",10g,"]",v
>"]i[]b[">:#,_>~:01-`|       ,             vp01"u"< <
       >:#,_@ ^              <             <p01"o"<_^#`"t"g01<
       ^  "[/i][/b]"$<

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List