Declaring Lists

Description

In Sage, you can create a list of items and assign it to a variable.

Sage Cell

Code

A = [ 2, 3, 8, 11, 31 ]
print A

Options

Lists of Strings

Lists can also be composed of string (text) values:

Code

A = [ 'words', 'Monday', 'lasagne', 'review', 'bike' ]
print A

Tags

Primary Tags:

Secondary Tags:

A list of possible tags can be found at The WeBWorK Open Problem Library. For linear algebra tags see the Curated Courses Project.

Related Cells

Any related cells go here. Provide a link to the page containing the information about the cell.

Attribute

Permalink:

Author:

Date: 23 Mar 2019 01:11

Submitted by: Zane Corbiere

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License