Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article

Checking the equality of sets in Julia – issetequal() Method

  • Last Updated : 24 Feb, 2021

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






# Julia program to illustrate
# the use of issetequal() method
  
# Getting true if the two sets
# are equal else returns false.
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




# Julia program to illustrate
# the use of issetequal() method
  
# Getting true if the two sets
# are equal else returns false.
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: 
 

 




My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!