Checking the equality of sets in Julia – issetequal() Method
The issetequal() is an inbuilt function in julia which is used to determine whether the two specified sets a and b have the same elements or not.
Syntax:
issetequal(a, b)
Parameters:
- a: Specified first set
- b: Specified second set.
Returns: It returns true if the two sets are equal else returns false.
Example 1:
Python
println(issetequal([ 1 , 2 ], [ 1 , 2 , 3 ]))
println(issetequal([ 1 , 2 ], [ 3 , 1 , 2 ]))
println(issetequal([ 2 , 2 ], [ 1 , 2 , 2 ]))
|
Output:
Example 2:
Python
println(issetequal([ 1 , 2 ], [ 1 , 2 ]))
println(issetequal([ 1 , 2 ], [ 2 , 1 ]))
println(issetequal([ 2 , 2 , 3 ], [ 2 , 3 , 2 ]))
println(issetequal([ 1 , 2 , 3 ], [ 3 , 1 , 2 ]))
|
Output:
Last Updated :
24 Feb, 2021
Like Article
Save Article
Share your thoughts in the comments
Please Login to comment...