> 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/variables/statevariables/statevariable/statevariable.is_constant.md).

# StateVariable.is\_constant()

Returns true if the state variable is constant, otherwise returns false.

`is_constant() → bool`

## Query Example

```python
from glider import *


def query():
  state_variables = (
    StateVariables()
    .exec(40)
    .filter(lambda state_variable: state_variable.is_constant())
  )

  print(state_variables[0].source_code())

  return state_variables
```

## Example Output

<figure><img src="https://2237101709-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDX4Ojc4j1ef51TUAtYOx%2Fuploads%2FKY4yMdFiZqiRuqfqjXkg%2Fimage.png?alt=media&amp;token=c8fe222d-1181-4bae-b3e0-cd360ffd9672" alt=""><figcaption></figcaption></figure>
