Emojicode 🍿 Lists

christian.dinh's avatar
Published Aug 4, 2021Updated Sep 9, 2021
Contribute to Docs

A list literal is a listing of expressions.

Lists are always ordered and can contain different types of objects, such as strings, integers, booleans, etc. Lists are a mutable data type and therefore a good choice for dynamic data (adding and subtracting to lists).

  • Looking for an introduction to the theory behind programming? Master Python while learning data structures, algorithms, and more!
    • Includes 6 Courses
    • With Professional Certification
    • Beginner Friendly.
      75 hours
  • πŸ‡ Learn about Emojicode, a programming language that consists of emojis! πŸ‰
    • Beginner Friendly.
      1 hour

Syntax

In Emojicode, a list is created by using 🍿 and πŸ†.

For instance, the example below is a list literal with integer values 18, 67, 420.

🍿 18 67 420 πŸ†

Here’s another list with three strings:

🍿 πŸ”€eggsπŸ”€ πŸ”€blueberriesπŸ”€ πŸ”€cookiesπŸ”€ πŸ†

The compiler will try to infer the type of a list literal. The default type of list literals, is the list type 🍨, an ordered mutable collections of values.

All contributors

Contribute to Docs

Learn Emojicode on Codecademy

  • Looking for an introduction to the theory behind programming? Master Python while learning data structures, algorithms, and more!
    • Includes 6 Courses
    • With Professional Certification
    • Beginner Friendly.
      75 hours
  • πŸ‡ Learn about Emojicode, a programming language that consists of emojis! πŸ‰
    • Beginner Friendly.
      1 hour