Search code examples
rpython-3.xcodeblocks

Creating block of codes in Python


In R, I can create a collapsible block of codes using

{
## My R code
}

I am wondering if there is any similar approach for Python? Clearly above {} is not working in Python. I tried with :, but still get error.

Any pointer will be very helpful.


Solution

  • Or you can use a dummy "if True:" like in:

    if True:
       #now you are in a new block of code
       #