Sql Length Function String In Python Syntax For Loop