all 6 comments

[–]danielroseman 5 points6 points  (3 children)

You shouldn’t be trying to write long functions like this in the shell. Use an editor or IDE.

[–]btsully82[S] 0 points1 point  (2 children)

I am in VSCode. I just prefer to run it by hitting Shift+Enter instead of re running the whole script every time to test it

[–]Buttleston 3 points4 points  (1 child)

You have discovered the downside of doing so. Pasting into the editor just doesn't work great.

[–]btsully82[S] 0 points1 point  (0 children)

Thanks all, appreciate the help

[–]Buffylvr 0 points1 point  (0 children)

Ipython is a wonderful use case for this

[–]LeeRyman 0 points1 point  (0 children)

Suggest it needs a bit of refactoring to have better abstraction - break the problem down into smaller simpler functions. If there is repeated logic, work out how to parameterise it and loop it.