WLJS LogoWLJS Notebook

ReadList

ReadList["file"] reads all expressions in a file and returns a list.

ReadList["file", type] reads objects of the specified type.

ReadList["file", types, n] reads only the first n objects.

Examples

Read all expressions:

ReadList["data.txt"]
(* {expr1, expr2, ...} *)

Read numbers:

ReadList["numbers.txt", Number]
(* {1, 2, 3, 4, 5} *)

Please visit the official Wolfram Language Reference for more details.

On this page