diff --git a/E_1768_MergeStringsAlternately.py b/E_1768_MergeStringsAlternately.py new file mode 100644 index 0000000..c72271f --- /dev/null +++ b/E_1768_MergeStringsAlternately.py @@ -0,0 +1,7 @@ +class Solution: + def mergeAlternately(self, word1: str, word2: str) -> str: + res='' + for i in range(min(len(word1),len(word2))): + res += word1[i] + word2[i] + + return res + word1[i+1:] + word2[i+1:] \ No newline at end of file