Program to check if two arrays are equal in Python

In this tutorial, you will learn how to write Python program to compare two arrays and check that they are equal in size or not.


To check two array is equal or not in size, first calculate the size of both array using len() function of Python.

Now after finding length we can just compare it using if statement. 


Python Program to check the size of given two arrays are equal or not

if len(arr1) == len(arr2):
    print("array is equal")
    print("array is not equal") 


array is equal or not in python