+

Python | sympy.sets.Ropen () method

With the sympy.sets.Ropen() method, we can create a set of values ​​by setting spacing values ​​such as right open, which means the set has a right open parenthesis and left sympy.sets.Ropen () with sympy.sets.Ropen () .

Syntax: sympy.sets.Ropen (val1, val2)
Return: Return set of values ​​with right open set.

Example # 1:
In this example, we see that with sympy.sets.Ropen () we can find a set of values ​​by setting the right open brackets.

# import sympy

from sympy.sets import Interval

  
# Use the sympy.sets.Ropen () method

gfg = Interval.Ropen ( 0 , 10 )

print (gfg)

  

print (gfg.contains ( 0 ))

Output:

[0, 10 )
True

Example # 2:

# import sympy

from sympy.sets import Interval

 
# Use the sympy.sets.Ropen method ()

gfg = Interval.Ropen ( 0 , 5 )

print (gfg)

 

print (gfg.contains ( 5 ))

[0, 5)
False

Get Solution for free from DataCamp guru