Skip to content

Instantly share code, notes, and snippets.

@lmmx
Created March 19, 2023 09:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lmmx/4c4d9df7fdc6a83c1796dfa43d107809 to your computer and use it in GitHub Desktop.
Save lmmx/4c4d9df7fdc6a83c1796dfa43d107809 to your computer and use it in GitHub Desktop.
Split the string "/a/b/c" into 2 parts: "a" and "/b/c" (first simple task I found both GPT-3.5 and GPT-4 unable to achieve)
first, second = "/a/b/c".lstrip("/").replace("/", "//", 1).split("/", 1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment