Home
Recent Q&A
Java
Cloud
JavaScript
Python
SQL
PHP
HTML
C++
Data Science
DBMS
Devops
Hadoop
Machine Learning
Azure
Blockchain
Devops
Ask a Question
Checking whether the two words are anagrams or not in python
Home
Python
Checking whether the two words are anagrams or not in python
0
votes
asked
May 24, 2020
in
Python
by
SakshiSharma
Checking whether the two words are anagrams or not
#python-anagrams
#anagram-python
Python-questions-answers
Please
log in
or
register
to answer this question.
1
Answer
0
votes
answered
May 24, 2020
by
Robindeniel
from collections import Counter
def is_anagram(str1, str2):
return Counter(str1) == Counter(str2)
print(is_anagram('majix', 'magic'))
print(is_anagram('majix', 'xijam'))
Output:
False
True
Related questions
0
votes
Q: Write a program to check whether the given number is prime or not?
asked
May 17, 2020
in
Python
by
sharadyadav1986
#python-prime-number-program
Python-questions-answers
0
votes
Q: Explain How Python Does Compile-time And Run-time Code Checking in Python?
asked
Jun 28, 2020
in
Python
by
Robindeniel
#python-compile-time-check
#python-compile-time
#python-run-time
#python-run-time-check
Python-questions-answers
+1
vote
Q: Which of the following words cannot be a variable in python language?
asked
Jan 30, 2022
in
Python
by
sharadyadav1986
python-variable
Python-questions-answers
+1
vote
Q: Given two strings A and B, return whether or not A can be shifted some number of times to get B.
asked
Oct 28, 2022
in
Python
by
SakshiSharma
python-function
string-functions
0
votes
Q: A function with parameters cannot be decorated. State whether true or false.
asked
Jun 13, 2019
in
Python
by
Derya
#java
#python
#python-tutorial
#ball-python
Python-questions-answers
+1
vote
Q: Write a python program to check if the number given is a palindrome or not
asked
Feb 15, 2021
in
Python
by
SakshiSharma
#python-program
palindrome-program
python-palindrome
Python-questions-answers
0
votes
Q: Is there a switch or case explanation in Python Language? In the event that not, at that point Can you please clarify what is the explanation behind the equivalent?
asked
Aug 29, 2020
in
Python
by
Robindeniel
#python-language
Python-questions-answers
0
votes
Q: Write Python code to check the given sequence is a palindrome or not?
asked
May 17, 2020
in
Python
by
sharadyadav1986
#python-palindrome-program
Python-questions-answers
0
votes
Q: Which one of the following is known as the Equality operator, which is used to check whether the two values are equal or not:
asked
Mar 21, 2021
in
JavaScript
by
rajeshsharma
equality-operator
javascript
javascript-operator
0
votes
Q: The two main versions of Python include ___________.
asked
Jun 24, 2020
in
Python
by
Robindeniel
#python-versions
#version-python
Python-questions-answers
...