WOLFRAM

represents an element of a list that will automatically be removed.

Nothing[]

gives Nothing.

Details

  • Nothing is removed as part of the standard evaluation process. It is not removed in expressions that are held or inactive.

Examples

open allclose all

Basic Examples  (2)Summary of the most common use cases

Any occurrence of Nothing is automatically removed in a list:

Out[1]=1

Replace an element of a list with Nothing to remove it:

Out[1]=1

Scope  (2)Survey of the scope of standard use cases

Nothing is removed wherever it appears in a list:

Out[1]=1

Nothing is not removed from heads other than List:

Out[1]=1

Generalizations & Extensions  (1)Generalized and extended use cases

When Nothing appears as a head, it reduces any expression to Nothing:

Out[1]=1
Out[2]=2

Applications  (1)Sample problems that can be solved with this function

Delete lines from a plot, leaving only isolated points:

Out[1]=1
Out[2]=2

Properties & Relations  (3)Properties of the function, and connections to other functions

Nothing is removed during the standard evaluation process:

Out[1]=1
Out[2]=2

Remove primes from a list by replacing them with Nothing:

Out[1]=1

Delete the primes with a pattern:

Out[2]=2

Select the non-primes:

Out[3]=3

Nothing will only disappear inside lists:

Out[1]=1
Out[2]=2

An empty Sequence[] will evaporate inside any head except those with special attributes:

Out[3]=3
Out[4]=4

Possible Issues  (1)Common pitfalls and unexpected behavior

Nothing is removed as part of standard evaluation, so it is kept in held expressions:

Out[1]=1

When the Hold is released, Nothing is removed:

Out[2]=2
Wolfram Research (2015), Nothing, Wolfram Language function, https://reference.wolfram.com/language/ref/Nothing.html (updated 2016).
Wolfram Research (2015), Nothing, Wolfram Language function, https://reference.wolfram.com/language/ref/Nothing.html (updated 2016).

Text

Wolfram Research (2015), Nothing, Wolfram Language function, https://reference.wolfram.com/language/ref/Nothing.html (updated 2016).

Wolfram Research (2015), Nothing, Wolfram Language function, https://reference.wolfram.com/language/ref/Nothing.html (updated 2016).

CMS

Wolfram Language. 2015. "Nothing." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2016. https://reference.wolfram.com/language/ref/Nothing.html.

Wolfram Language. 2015. "Nothing." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2016. https://reference.wolfram.com/language/ref/Nothing.html.

APA

Wolfram Language. (2015). Nothing. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Nothing.html

Wolfram Language. (2015). Nothing. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Nothing.html

BibTeX

@misc{reference.wolfram_2025_nothing, author="Wolfram Research", title="{Nothing}", year="2016", howpublished="\url{https://reference.wolfram.com/language/ref/Nothing.html}", note=[Accessed: 09-July-2025 ]}

@misc{reference.wolfram_2025_nothing, author="Wolfram Research", title="{Nothing}", year="2016", howpublished="\url{https://reference.wolfram.com/language/ref/Nothing.html}", note=[Accessed: 09-July-2025 ]}

BibLaTeX

@online{reference.wolfram_2025_nothing, organization={Wolfram Research}, title={Nothing}, year={2016}, url={https://reference.wolfram.com/language/ref/Nothing.html}, note=[Accessed: 09-July-2025 ]}

@online{reference.wolfram_2025_nothing, organization={Wolfram Research}, title={Nothing}, year={2016}, url={https://reference.wolfram.com/language/ref/Nothing.html}, note=[Accessed: 09-July-2025 ]}