You don't have that choice. Python indexing starts at 0, and is not configurable.

You can just subtract 1 from your indices when indexing:

array.insert(i - 1, element)  # but better just use array.append(element)
print(i, array[i - 1])

or (more wasteful), start your list with a dummy value at index 0:

array = [None]

at which point the next index used will be 1.

Answer from Martijn Pieters on Stack Overflow
🌐
Quora
quora.com › In-Python-where-from-the-indexing-starts-0-or-1
In Python, where from the indexing starts 0 or 1? - Quora
Answer (1 of 51): Basically index categories in two types : Positive indexing : here index start from '0′. Examples: suppose our list list1=[1, 2,3,4] Indexes: 0,1,2,3 list1[0]=1 list1[1]=2….. Like that Negative indexing : here index start ...
🌐
Medium
medium.com › @jonathanbluks › arrays-start-at-zero-whats-up-with-that-f2d1054c9b77
Arrays Start at Zero: What’s up with that? | by Jonathan Bluks | Medium
February 22, 2019 - Particularly important for “data”. Python, like many programming languages, uses 0-based indexing for arrays, and the course contained a link to a post intended to explain this situation to a person with no programming experience.
🌐
Sololearn
sololearn.com › en › Discuss › 2067915 › why-we-always-start-array-index-with-a0-not-with-a1
Why we always start array index with a[0] not with a[1]? | Sololearn: Learn to code for FREE!
Index starts from 0 not 1 because it is created like that way. a = ['a', 'b', 'c'] | | | 0 1 2 print(a[0]) # output will be a The first element of the array is exactly contained in the memory location that array refers (0 elements away), so ...
🌐
DataCamp
datacamp.com › tutorial › python-list-index
Python List index() Method Explained with Examples | DataCamp
March 28, 2025 - In Python, indexing refers to the process of accessing a specific element in a sequence, such as a string or list, using its position or index number. Indexing in Python starts at 0, which means that the first element in a sequence has an index of 0, the second element has an index of 1, and so on.
🌐
Medium
medium.com › analytics-vidhya › array-indexing-0-based-or-1-based-dd89d631d11c
Array Indexing: 0-based or 1-based? | by Kim Fung | Analytics Vidhya | Medium
January 18, 2024 - This is where a comes in, ranging from 0 to 4: a becomes the index for the item you are looking for (0-4), within the block (numbered from 0-9). An example of this is shown in the following array in Python:
🌐
W3Schools
w3schools.com › python › numpy › numpy_array_indexing.asp
NumPy Array Indexing
The indexes in NumPy arrays start with 0, meaning that the first element has index 0, and the second has index 1 etc.
🌐
Medium
albertkoz.com › why-does-array-start-with-index-0-65ffc07cbce8
Why Do Arrays Start With Index 0? | by Albert Kozłowski | Medium
February 15, 2020 - Why Do Arrays Start With Index 0? Whether you code in JavaScript, Python, Java, PHP, Ruby, or Go, to access the first element of the array you will need to refer to array[0]. This is often confusing …
Find elsewhere
🌐
Blogger
python-history.blogspot.com › 2013 › 10 › why-python-uses-0-based-indexing.html
The History of Python: Why Python uses 0-based indexing
Dijkstra had a monograph about this: https://www.cs.utexas.edu/~EWD/transcriptions/EWD08xx/EWD831.html Also I should point out that the correct first number is zero, and kids should be taught to count "0, 1, 2, ...". It fixes a lot of problems that you get if you start a 1. In this light, there's ...
🌐
Enchantia
enchantia.com › graphapp › doc › tech › arrays1.html
Arrays Indexed From One
In Python, arrays are indexed from 0, but can also be indexed (from the end of the array) using negative numbers, as illustrated: Python: 0 1 2 3 4 5 6 7 8 9 A B C D E F G H I J -10 -9 -8 -7 -6 -5 -4 -3 -2 -1 Python's indexing scheme has several desirable properties.
🌐
Wikipedia
en.wikipedia.org › wiki › Zero-based_numbering
Zero-based numbering - Wikipedia
January 8, 2026 - Pascal allows the range of an array to be of any ordinal type (including enumerated types) and Ada allows any discrete subtype. APL allows setting the index origin to 0 or 1 during runtime programmatically.
🌐
YouTube
youtube.com › watch
Index starts with 0 & not 1 - But why? - YouTube
#shortsEver wondered why the index starts with 0 and not 1 in python?All the source code and other material will be uploaded on https://codewithharry.com as ...
Published   May 22, 2022
🌐
freeCodeCamp
freecodecamp.org › news › slicing-and-indexing-in-python
Slicing and Indexing in Python – Explained with Examples
December 11, 2025 - In Python, indexing starts from 0, which means the first element in a sequence is at position 0, the second element is at position 1, and so on.
Top answer
1 of 7
186

To explain it in another way, because -0 is equal to 0, if backward starts from 0, it is ambiguous to the interpreter.


If you are confused about -, and looking for another way to index backwards more understandably, you can try ~, it is a mirror of forward:

arr = ["a", "b", "c", "d"]
print(arr[~0])   # d
print(arr[~1])   # c

The typical usages for ~ are like "swap mirror node" or "find median in a sort list":

"""swap mirror node"""
def reverse(arr: List[int]) -> None:
    for i in range(len(arr) // 2):
        arr[i], arr[~i] = arr[~i], arr[i]

"""find median in a sort list"""
def median(arr: List[float]) -> float:
    mid = len(arr) // 2
    return (arr[mid] + arr[~mid]) / 2

"""deal with mirror pairs"""
# verify the number is strobogrammatic, strobogrammatic number looks the same when rotated 180 degrees
def is_strobogrammatic(num: str) -> bool:
    return all(num[i] + num[~i] in '696 00 11 88' for i in range(len(num) // 2 + 1))

~ actually is a math trick of inverse code and complement code, and it is more easy to understand in some situations.


Discussion about whether should use python tricks like ~:

In my opinion, if it is a code maintained by yourself, you can use any trick to avoid potential bug or achieve goal easier, because of maybe a high readability and usability. But in team work, avoid using 'too clever' code, may bring troubles to your co-workers.

For example, here is one concise code from Stefan Pochmann to solve this problem. I learned a lot from his code. But some are just for fun, too hackish to use.

# a strobogrammatic number is a number that looks the same when rotated 180 degrees (looked at upside down)
# find all strobogrammatic numbers that are of length = n
def findStrobogrammatic(self, n):
    nums = n % 2 * list('018') or ['']
    while n > 1:
        n -= 2
        # n < 2 is so genius here
        nums = [a + num + b for a, b in '00 11 88 69 96'.split()[n < 2:] for num in nums]
    return nums

I have summarized python tricks like this, in case you are interested.

2 of 7
175
list[-1]

Is short hand for:

list[len(list)-1]

The len(list) part is implicit. That's why the -1 is the last element. That goes for any negative index - the subtraction from len(list) is always implicit

🌐
HackerEarth
hackerearth.com › practice › notes › samarthbhargav › a-quick-intro-to-indexing-in-python
A Quick intro to Indexing in Python - Samarth Bhargav
So a step size of 1 tells python to pick every element, a step size of 2 means pick alternate elements, and so on. The step size is specified after the end-index, preceded by a colon. i.e ... Of course, if you leave start_index and end_index ...
🌐
Sololearn
sololearn.com › en › Discuss › 1860730 › why-does-indexing-starts-from-0
Why does indexing starts from 0? | Sololearn: Learn to code for FREE!
Arrays use up a block of memory locations, and the first element of the array contains the exact memory location of the array, so it's not offset, therefore the first index being 0