Skip to content

Latest commit

 

History

History
15 lines (13 loc) · 1.04 KB

introduction.md

File metadata and controls

15 lines (13 loc) · 1.04 KB

Introduction

A list is a mutable collection of items in sequence. 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(). Python provides many useful and convenient methods for working with lists.