lengthプロパティ。
var q = "aaa"; if(q.length==0) return;
組み込み関数len()を使う。
>>> s = 'supercalifragilisticexpialidocious' >>> len(s) 34