Search
ctrl/
Ask AI
Light
Dark
System

Operators

Subtopics

There are 3 types that share the same way of accessing an element based on the index: str, bytes, and arrays. All of these types use the [...] operator to access their elements:

Input
Run
Output Objects
Press the 'Run' button to evaluate the input
Input
Run
Output Objects
Press the 'Run' button to evaluate the input
Input
Run
Output Objects
Press the 'Run' button to evaluate the input

Note that tuples don't use the same mechanism for accessing their elements. Their method of using the . is similar to object types, which will be covered in the next tutorial section.