Skip to content

Latest commit

 

History

History
14 lines (12 loc) · 1014 Bytes

introduction.md

File metadata and controls

14 lines (12 loc) · 1014 Bytes

Introduction

A list is a mutable collection of items in sequence. They are an extremely flexible and useful data structure that many built-in methods and operations in Python produce as output. Lists can hold reference to any (or multiple) data type(s) - including other lists or data structures such as tuples, sets, or dicts. Content can be iterated over using for item in <list> construct. If indexes are needed with the content, for index, item in enumerate(<list>) can be used. Elements within a list can be accessed via 0-based index number from the left, or -1-based index number from the right. Lists can be copied in whole or in part using slice notation or <list>.copy().