Skip to content

Instantly share code, notes, and snippets.

@sanjitk7
Last active May 16, 2020 17:53
Show Gist options
  • Save sanjitk7/dca4101371c78c289e567681475caa27 to your computer and use it in GitHub Desktop.
Save sanjitk7/dca4101371c78c289e567681475caa27 to your computer and use it in GitHub Desktop.
split camel case
def test_camelCaseSplit(self):
self.assertEqual(camelCaseSplit("theDarkKnightRises"),["the","Dark","Knight","Rises"])
self.assertEqual(camelCaseSplit("helloW"),["hello","W"])
self.assertEqual(camelCaseSplit("helloIWorld"),["hello","I","World"])
with self.assertRaises(TypeError):
camelCaseSplit(1234)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment