Skip to content

Instantly share code, notes, and snippets.

@leveled
Created August 9, 2019 00:33
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 leveled/06a51e4a2bcf0f9ed79ca3c213390adb to your computer and use it in GitHub Desktop.
Save leveled/06a51e4a2bcf0f9ed79ca3c213390adb to your computer and use it in GitHub Desktop.
Divide string in half in python
firstpart, secondpart = string[:len(string)//2], string[len(string)//2:]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment