> For the complete documentation index, see [llms.txt](https://docs.r.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.r.xyz/glider-ide/api/instruction/ifinstruction/ifinstruction.get_condition.md).

# IfInstruction.get\_condition()

`get_condition() →` [`Condition`](/glider-ide/api/instruction/ifinstruction/condition.md)

Returns condition of the if-statement.

## Query Example

```python
from glider import *

def query():
  instructionlist = Instructions().if_instructions().exec(1)
  
  condition = instructionlist[0].get_condition()
  print(condition.is_eq())
  return instructionlist
```

## Output Example

<figure><img src="https://2237101709-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDX4Ojc4j1ef51TUAtYOx%2Fuploads%2F7Nzw8hdSWVlK6iaRSzcD%2Fimage.png?alt=media&amp;token=03322fd1-5e99-4128-8cb0-2b709892d08d" alt=""><figcaption></figcaption></figure>
