<s> __author__ = "<STR_LIT>" <EOL> '''<STR_LIT>''' <EOL> from linked_list_fifo import LinkedListFIFO <EOL> from node import Node <EOL> def partList ( ll , n ) : <EOL> more = LinkedListFIFO ( ) <EOL> less = LinkedListFIFO ( ) <EOL> node = ll . head <EOL> while node : <EOL> item = node . value <EOL> if item < n : <EOL> less . addNode ( item ) <EOL> elif item > n : <EOL> more . addNode ( item ) <EOL> node = node . pointer <EOL> less . addNode ( n ) <EOL> nodemore = more . head <EOL> while nodemore : <EOL> less . addNode ( nodemore . value ) <EOL> nodemore = nodemore . pointer <EOL> return less <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> ll = LinkedListFIFO ( ) <EOL> l = [ <NUM_LIT:6> , <NUM_LIT:7> , <NUM_LIT:3> , <NUM_LIT:4> , <NUM_LIT:9> , <NUM_LIT:5> , <NUM_LIT:1> , <NUM_LIT:2> , <NUM_LIT:8> ] <EOL> for i in l : <EOL> ll . addNode ( i ) <EOL> print ( '<STR_LIT>' ) <EOL> ll . _printList ( ) <EOL> print ( '<STR_LIT>' ) <EOL> newll = partList ( ll , <NUM_LIT:6> ) <EOL> newll . _printList ( ) </s>
