Pybites Logo

String to Index

Level: Intermediate (score: 3)

Write a function that converts letters (from the English alphabet) into their corresponding zero-based indices (where A = 0, B = 1, C = 2, and so on).

The input can be a string or a list of strings, and it can also handle ranges, like "A:C", meaning all letters from A to C.