You need to add spaces after for, if... statements in your code examples. I just made a Python tutorial for a ML course in Spanish. It is in Colab and should be easy to translate: https://colab.research.google.com/drive/1uoxgduAnH3e4Pz0YHLAyMnw2Cpilqqpy