# [Pip] `-n`, 21 bytes _@>--b@<dM(a^n--c+,e) [Try it online!][TIO-jnptiigu] Or, if 0-indexing is allowed... ## Pip `-n`, **17 bytes**: _@>b@<dM(a^nc+,e) [Try it online!][TIO2] ### Explanation Takes all five arguments as command-line args. a-e are the 5 cmdline args; n is newline a^n Split a on newlines ,e Range(e) c+ Add c to each element ( ) Use the resulting range(c,c+e) to slice into the list of lines M To each line, map this function: _ The line @>b Slice, keeping indices b and greater @<d Slice, keeping indices less than d Print, joining on newlines (-n flag) ---- The above solutions also assume the input is a perfect rectangle--i.e., the lines are all the same length. Otherwise, 2 extra bytes are needed (use `-l` instead of `-n`): (Z(a^nZDsb+,d)c+,e) 0-indexed, 19 bytes (Z(a^nZDs--b+,d)--c+,e) 1-indexed, 23 bytes [Pip]: https://github.com/dloscutoff/pip [TIO-jnptiigu]: https://tio.run/##jY87DsIwDIb3nMLq0lb0d@iAkICiXoAbRKS8JMpQdWPJ3U2a9MGChC0l@X47fvRtL2LrI3CtD/dTdjl3wG1VPHIRQSc0m7VWTe8iAZDwzLtw7memBox0QXLk/iHLMFaDYydL2gdjiqGgae9DdSD1tyGjBi0Ik/mAV3WBJAFP8wYwKqMWzGhHeYRcuSb0cWOJCKlTZliEh5JFxTSCVks/V01/fm8bp5wt9/58vb@kuNQiZN6JpFxLuZGNbD8 "Pip – Try It Online" [TIO2]: https://tio.run/##jY/JCsIwEIbveYqhl7bYmSAo4lLpC/gGwdQNrIfSm5e8@5i9XgRnIMn3z2SWaZiYdXe8dof7qbqcx9uiedTMjCNDNq21SO@mQMSCMu/8uc8MPRKWM4IB8w9pQqUlUuikQdpgSFHgNWndVUcs7a1ACad5IZkNWFU2WBRIaV4PSlQwIBEOUY5QC9P7PiaWCFAaodwi5Eo2LUEEKeZ@pk1/fm8bpsxWW3@@3l9SWGoWKusAvOXlite8@QA "Pip – Try It Online"