Python Dictionary Length Function On Strings