← coderbyte_practice

test

91440109f2b84bede808e71a3ac53a4d2abbaf71 · ovidiucs · May 6, 2015 21:22

+8 −3 · 1 file changed

  • medium/06-string-scramble.py +8 −3
diff --git a/medium/06-string-scramble.py b/medium/06-string-scramble.py
index 12fe90b..507f9e0 100644
--- a/medium/06-string-scramble.py
+++ b/medium/06-string-scramble.py
@@ -1,8 +1,13 @@
 def StringScramble(str1,str2):
 
-    if set(str1) == set(str2):
-        return 'true'
-    return'false'
+    ll = (set(str1) & set(str2))
+    # for n in ll:
+    #     if n in str1 or str2:
+    #         print 'f',n
+
+    if len(ll ^ set(str2)) and len(ll ^ set(str1)):
+        return 'false'
+    return 'true'
     
 # keep this function call here  
 # to see how to enter arguments in Python scroll down