table for both encoding and decodingusing the zip trick of section for creating dictionaries finallywe use the translate method to do the actual substituting partition the partition method is similar to the list split method the difference is illustrated below' partition'' split'(' ''' '[' '' the difference is that the argument to the function is returned as part of the output the partition method also returns tuple instead of list here is an example that calculates the derivative simple monomial entered as string the rule for derivatives is that the derivative of ax is nax - input'enter monomial'coeffpower partition' 'print'{} ^{format(int(coeff)*int(power)int(power)- enter monomial ^ ^ note these methodsand many otherscould be done directly just using the basic tools of the language like for loopsif statementsetc the ideathoughis that those things that are commonly done are made into methods or classes that are part of the standard python distribution this can help you from having to reinvent the wheel and they can also make your programs more reliable and easier to read comparing strings comparison of strings is done alphabetically for examplethe following will print yes if 'that 'this 'print'yes 'beyond thatif the string contains characters other than lettersthe comparison is based off the ord value of the characters miscellaneous tips and tricks here are few useful tips