Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

check it two words are anagram pyhton

# function to check if two strings are
# anagram or not
def check(s1, s2):
     
    # the sorted strings are checked
    if(sorted(s1)== sorted(s2)):
        print("The strings are anagrams.")
    else:
        print("The strings aren't anagrams.")        
         
# driver code 
s1 ="listen"
s2 ="silent"
check(s1, s2)
Comment

PREVIOUS NEXT
Code Example
Python :: RC style Relative Referencing in OpenPyXL 
Python :: python reverse list every 2 element 
Python :: Python Pipelining Generators 
Python :: Python Raw string using r prefix 
Python :: adding new character in string python 
Python :: html to image pygame python 
Python :: prevent not admin from visiting a url tornado python 
Python :: To do floor division and get an integer result (discarding any fractional result) 
Python :: model summary change size of columns 
Python :: winwin 
Python :: code converter html 
Python :: how to make an app that sends email in python 
Python :: how to access clipboard with python 
Python :: dynamic id python 
Python :: big python code 
Python :: dft numpy amplitude 
Python :: flask how to initialze extension after start 
Python :: HIDING AND ENCRYPTING USING BASE24 MODULE 
Python :: how to install python on linux chromebook 
Python :: mystring = "hello" myfloat=float 10 myint=20 
Python :: looping through models and plotting their performance 
Python :: Fill NaN with the first valid value starting from the rightmost column, then extract first column 
Python :: python code optimization 
Python :: change between two python 3 version in raspberrry pi 
Python :: grouped box plot in python 
Python :: provide a script that prints the sum of every even numbers in the range [0; 100]. 
Python :: python iterar claves 
Python :: returns the dataframe with the modified Title column in which the updated groupings are reflected. 
Python :: how is pythons glob.glob ordered list 
Python :: create a variable python 
ADD CONTENT
Topic
Content
Source link
Name
3+2 =