> 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/localvariables/localvariable/localvariable.source_code.md).

# LocalVariable.source\_code()

Returns the source code of the local variable.

`source_code() → str`

## Query Example

```python
from glider import *


def query():
  functions = (
    Functions()
    .with_name("communityMint")
    .exec(1)
  )

  for func in functions:
    local_vars = func.local_variables().list()
    for local_var in local_vars:
      print(local_var.source_code())

  return functions
```

## Example Output

<figure><img src="https://2237101709-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDX4Ojc4j1ef51TUAtYOx%2Fuploads%2F3YFEMSUlmJb5ZSREPDqL%2FScreenshot%202025-09-10%20at%204.52.00%E2%80%AFPM.png?alt=media&amp;token=b2328552-8031-40c1-bbcd-27276d44c40e" alt=""><figcaption></figcaption></figure>
