list(n) Tcl Built-In Commands list(n)

```

```

# [NAME](#NAME)

list - Create a list

# [SYNOPSIS](#SYNOPSIS)

**list** ?*arg ...*?

```

```

# [DESCRIPTION](#DESCRIPTION)

This command returns a list comprised of all the *arg*s, or an empty string if no *arg*s are specified. Braces and backslashes get added as necessary, so that the **lindex** command may be used on the result to re-extract the original arguments, and also so that **eval** may be used to execute the resulting list, with *arg1* comprising the command's name and the other *arg*s comprising its arguments. **List** produces slightly different results than **concat**: **concat** removes one level of grouping before forming the list, while **list** works directly from the original arguments.

# [EXAMPLE](#EXAMPLE)

The command

```
list a b "c d e  " "  f {g h}"
```

will return

```
a b {c d e  } {  f {g h}}
```

while **concat** with the same arguments will return

```
a b c d e f {g h}
```

# [SEE ALSO](#SEE_ALSO)

[lappend(n)](/man/os/tcl/lappend.n), [lassign(n)](/man/os/tcl/lassign.n), [ledit(n)](/man/os/tcl/ledit.n), [lindex(n)](/man/os/tcl/lindex.n), [linsert(n)](/man/os/tcl/linsert.n), [llength(n)](/man/os/tcl/llength.n), [lmap(n)](/man/os/tcl/lmap.n), [lpop(n)](/man/os/tcl/lpop.n), [lrange(n)](/man/os/tcl/lrange.n), [lremove(n)](/man/os/tcl/lremove.n), [lrepeat(n)](/man/os/tcl/lrepeat.n), [lreplace(n)](/man/os/tcl/lreplace.n), [lreverse(n)](/man/os/tcl/lreverse.n), [lsearch(n)](/man/os/tcl/lsearch.n), [lseq(n)](/man/os/tcl/lseq.n), [lset(n)](/man/os/tcl/lset.n), [lsort(n)](/man/os/tcl/lsort.n)

# [KEYWORDS](#KEYWORDS)

element, list, quoting

Tcl

---

Document: list(n) from tcl 9.1.0-r2 (Chainguard OS)
Source: https://downloads.sourceforge.net/project/tcl/Tcl/9.1.0/tcl9.1.0-src.tar.gz
