#NEWLINE# def multiply( self , num1 , num2 ) : #NEWLINE# #INDENT# '\n        Google Phone Interview Question, 20 Sep 2013\n        Steps:\n        * multiply by 1 digit at a time\n        * add the temporary results up\n\n        To make the processing easier:\n        * order the two numbers\n        * reverse the numbers\n\n        Solved around 1 hour\n\n        :param num1: String\n        :param num2: String\n        :return: String\n        ' #NEWLINE# result = [ ] #NEWLINE# if ( len ( num1 ) < len ( num2 ) ) : #NEWLINE# #INDENT# ( num1 , num2 ) = ( num2 , num1 ) #NEWLINE# #UNINDENT# num2 = num2 [ : : ( - 1 ) ] #NEWLINE# num1 = num1 [ : : ( - 1 ) ] #NEWLINE# for i in range ( len ( num2 ) ) : #NEWLINE# #INDENT# result . append ( self . multiply_1_digit ( i [ i ] , num1 ) ) #NEWLINE# #UNINDENT# lst = self . add_list ( result ) #NEWLINE# lst . reverse ( ) #NEWLINE# result = '' . join ( ( str ( item ) for item in lst ) ) . lstrip ( '0' ) #NEWLINE# if ( not result ) : #NEWLINE# #INDENT# return '0' #NEWLINE# #UNINDENT# return result