def tablength(word, tabwidth):
 return (len(word.replace(u' DCTB ', u'')) + (word.count(u' DCTB ') * tabwidth))

def tablength ( word , tabwidth ) : return ( len ( word . replace ( u' DCTB ' , u'' ) ) + ( word . count ( u' DCTB ' ) * tabwidth ) )
return length of a word taking tabs into account .