Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
How to Double indent in Repl feature of Pythonista Pikey keyboard
-
Hi, I’ve discovered pythonista keyboard pikey and I wanted to use the feature REPL which lets you write code anywhere where you can type. I wanted to write a nested for loop but I keep getting indentation errors. I wrote
“>>> for x in range (10):
... for y in range(10):
... print(‘#’, end =‘’) # I don’t know how to indent this line
... print()
The “>>>” means start of code and “... ”( with 3 spaces) are for indentation I think? I would like to know if it’s possible to create a table of ‘#’ or to double indent in this REPL feature. Thanks -
@DaCondor54, ”...” is just indicating that the code continues, corresponding to the ”>>>” on the first line.
One space after the dots corresponds to the space between ”>” and ”for” on the first line.
Thus, indent in respect to the ”f” in ”for” on the first line. If you use 2-space indents, the second line should have 1+ 2 spaces after the dots, the third line 1+ 4, and the last line 1 + 2 again.