Open xasterKies opened 2 years ago
Again how do you want this commited?
import re
def anagrams(wordoneee, wordtwooo):
wordonee = re.sub(r'[^\w\s]', '', wordoneee)
wordtwoo = re.sub(r'[^\w\s]', '', wordtwooo)
wordone = wordonee.lower()
wordtwo = wordtwoo.lower()
listwordtwo = list(wordtwo)
lentwo = len(wordtwo)
for i in range(0,lentwo):
wordone = wordone.replace(listwordtwo[i],"")
if wordone == "":
return True
exit()
else:
return False
exit()
wordone = input("wordone ")
wordtwo = input("wordtwo ")
print(anagrams(wordone, wordtwo))
Hello @S10MC2015 Checkout the ReadMe it has all instructions on how to do so!
Normally we are suppose to do commits rather than commenting, The ReadMe is quite explanatory
assign me @xaster-Kies
please assign me
Please assign me
done @mtrishal123
Directions
Check to see if two provided strings are anagrams of each other. One String is an anagram of another if it uses the same character in the same quantity. Only consider characters, not spaces or punctuation. Consider capital letters in your program. Make use of Functions and Methods where necessory
You can code this with any language of your choice!
Examples
anagrams( 'rail safety' , 'fairy tales' ) -----> True anagrams( 'RAIL! SAFETY!' , 'fairy tales' ) -----> True anagrams( 'Hi there' , 'Bye there' ) -----> False