I am writing a program( check_check(a, b): ) in python that can check two strings if it uses exactly the same letters, but the order can be different. Spaces are ignored, as well as capitalization....



I am writing a program( check_check(a, b): ) in python that can check two strings if it uses exactly the same letters, but the order can be different. Spaces are ignored, as well as capitalization. and I have this Hint: Make a dictionary that holds how often a letter occurs in a word. The program must NOT use any import just vanilla coding, nothing extra. no libraries nothing  this is my program if you can fix it for me or rewrite it :


def check_check(a, b):



    n1 = len(a)

    n2 = len(b)


    if n1 != n2:

        return False


    a = sorted(a)

    b = sorted(b)


    for i in range(0, n1):

        if a[i] != b[i]:

            return False


    return True



Jun 06, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here