You probably want:
for i in n5 n25
do
if [ ${#i} -eq 2 ]; then
python two.py n5
elif [ ${#i} -eq 3 ]; then
python three.py n25
fi
done
Note that:
* `for` goes with `do ... done`.
* `if` goes with `then ... [elif; then] ... [else; then] ... fi`.
* the integer comparisons need `-eq` (equal) instead of `=` (for strings) and are written within brackets (`if [ "$var" -eq 2 ]`, etc).