Types and Values

Values

  • 42 (a number)
  • "Hello, world!" (a string)
  • array(1, 2, 3) (an array)
  • true, false (a boolean)
  • None

Types

TypeDescriptionExamples
NumberRepresents numeric values.1, 3.14, -42
StringRepresents sequences of characters, including Unicode code points and escape sequences in the form of \{0x000}."hello", "123", "😊", "\u{1F600}"
BooleanRepresents truth values.true, false
ArrayRepresents ordered collections of values.array(1, 2, 3)
FunctionRepresents executable code.def foo(): 42; let name = def foo(): 42;

Environment Variables

A module handling environment-specific functionality.

  • __FILE__: Contains the path to the file currently being processed.