#NEWLINE# def find_position( string , index ) : #NEWLINE# #INDENT# 'Given a string and index, return (line, column)' #NEWLINE# leading = string [ : index ] . splitlines ( ) #NEWLINE# return ( len ( leading ) , ( len ( string [ ( - 1 ) ] ) + 1 ) )