Python Trim String Length Function In Python Syntax For Loop