Knowee
Questions
Features
Study Tools

Write a program that figures out whether one string is an anagram of another string. The program should ignore white space and punctuation

Question

Write a program that figures out whether one string is an anagram of another string. The program should ignore white space and punctuation
🧐 Not the exact question you are looking for?Go ask a question

Solution 1

Sure, here is a Python program that checks if two strings are anagrams of each other. This program ignores white space and punctuation.

import string

def is_anagram(s1, s2):
    # Remove white spaces and convert to lower case
    s1 = s1.replace(" ", "").lower()
    s2 = s2.replace(" ", 
    Knowee AI  is a powerful AI-powered study tool designed to help you to solve study problem.
Knowee AI  is a powerful AI-powered study tool designed to help you to solve study problem.
Knowee AI  is a powerful AI-powered study tool designed to help you to solve study problem.
Knowee AI  is a powerful AI-powered study tool designed to help you to solve study problem.
Knowee AI  is a powerful AI-powered study tool designed to help you to solve study problem.
Knowee AI  

This problem has been solved

Similar Questions

Write a program that figures out whether one string is an anagram of another string. The program should ignore white space and punctuation

Write a Java program to find the smallest window in a string containing all characters of another string.

Write a Java program to check whether a substring(abc) appears before a period(.) within a given string

Python program that accepts a string and calculate the number of digits and letters and space

Write a python program to: Read two strings, then put the second string in the middle ofthe first string. And finally Write the new string in a new file.

1/3

Upgrade your grade with Knowee

Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.