@[email protected] to Programmer [email protected] • 6 months agoThe Perfect Solutionprogramming.devimagemessage-square74fedilinkarrow-up1673arrow-down18
arrow-up1665arrow-down1imageThe Perfect Solutionprogramming.dev@[email protected] to Programmer [email protected] • 6 months agomessage-square74fedilink
minus-squareenkerslink8•edit-26 months agoDownside is that it includes your indentation whitespace, though I doubt chatgpt would care about that, as I’d imagine it gets discarded when it’s tokenized, but it’s still good to keep in mind when using " " ".
minus-squareenkerslink1•edit-26 months agoThat’s a pretty clean looking solution. There are a few others as well, but yours seems better, and it’s in the standard lib to boot!
Downside is that it includes your indentation whitespace, though I doubt chatgpt would care about that, as I’d imagine it gets discarded when it’s tokenized, but it’s still good to keep in mind when using " " ".
dedent() can help with that.
That’s a pretty clean looking solution. There are a few others as well, but yours seems better, and it’s in the standard lib to boot!