From 0a4637ffcba27d5c2bdf888032ff2d53a9e4f794 Mon Sep 17 00:00:00 2001 From: Aman Mishra Date: Wed, 20 May 2026 02:39:13 +0530 Subject: [PATCH 1/3] Fixed multicharacter seperator bug --- strings/split.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/strings/split.py b/strings/split.py index ed194ec69c2f..84b63cae618f 100644 --- a/strings/split.py +++ b/strings/split.py @@ -20,6 +20,8 @@ def split(string: str, separator: str = " ") -> list: """ split_words = [] + if(len(separator)>1): + raise ValueError("Separator must be a single character") last_index = 0 for index, char in enumerate(string): From bb1dab4e268636d9c3de25ccfdf6bf47d9b98be3 Mon Sep 17 00:00:00 2001 From: amanmishra16032008-source Date: Wed, 20 May 2026 02:56:08 +0530 Subject: [PATCH 2/3] fix bug --- strings/split.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/strings/split.py b/strings/split.py index 84b63cae618f..68efa4eb9aab 100644 --- a/strings/split.py +++ b/strings/split.py @@ -21,7 +21,7 @@ def split(string: str, separator: str = " ") -> list: split_words = [] if(len(separator)>1): - raise ValueError("Separator must be a single character") + raise ValueError("Separator must be a single character!") last_index = 0 for index, char in enumerate(string): From 5805c1a3d459fb6dbbcf328bca05ca42aec9c46a Mon Sep 17 00:00:00 2001 From: amanmishra16032008-source Date: Wed, 20 May 2026 03:04:47 +0530 Subject: [PATCH 3/3] bugfixed --- strings/split.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/strings/split.py b/strings/split.py index 68efa4eb9aab..571cbe89119b 100644 --- a/strings/split.py +++ b/strings/split.py @@ -21,7 +21,7 @@ def split(string: str, separator: str = " ") -> list: split_words = [] if(len(separator)>1): - raise ValueError("Separator must be a single character!") + raise ValueError("Separator is for single character only") last_index = 0 for index, char in enumerate(string):