Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

Python - Cómo comprobar si dos cuerdas son anagramas

def check_anagram(a, b):     if a is None or b is None or len(a) != len(b):         return "Not Anagram"              return "Anagram" if sorted(a) == sorted(b) else "Not Anagram"  print(check_anagram("keen", "knee")) print(check_anagram("race", "care")) print(check_anagram("fried", "fired")) print(check_anagram("apple", "paddle")) print(check_anagram("first", "second")) print(check_anagram(None, "second")) print(check_anagram("first", None)) print(check_anagram(None, None))
Comment

PREVIOUS NEXT
Code Example
Python :: Python - Comment vérifier une corde contient un nombre 
Python :: Python - Comment faire pour supprimer les cotes de Chaîne 
Python :: Python - Cara Memisahkan String Berdasarkan Beberapa Delimiter 
Python :: Sending Emails 
Python :: how to convert comma separated string to list in python 
Python :: Convert this bash command into Python echo have a nice day Quizlet 
Python :: find las element of array python 
Python :: Allow Complex Number like "1+2j" to be treated as valid number 
Python :: python star sign before list 
Python :: successful=true for number in range (3) print ("Attempt") if successful: print ("Successful") breal 
Python :: django auto complete light styling 
Python :: remove cooldown discord python 
Python :: vscode how to extend output size in jupyter notebook 
Python :: moviepy not able to read the image file format 
Python :: semaphore example in python 
Python :: tuple with only one element in Python 
Python :: .comments.all order django 
Python :: first n lis tpython 
Python :: Mastermind 
Python :: python check if more than 1 is true 
Python :: get size of square matrix python 
Python :: initialize boolean list of size python 
Python :: how to search on wikipedia with python and speak the result 
Python :: create file and store output python 
Python :: how to create dll from java code 
Python :: Handling single exception 
Python :: python assertRaises with class property 
Python :: python send commands in one line but write in multiple 
Python :: requests session 
Python :: python open application 
ADD CONTENT
Topic
Content
Source link
Name
7+2 =