-1

Hi and thank you for stopping by this question, let me explain my problem.

Basically, i have a number, let's say it's 13.

Now, i have this:

alphabet = "abcdefghijklmnopqrstuvwxyz"

I need to know what's at position 13, basically a reverse alphabet.index()

Thank you in advance for your help!

3 Answers3

3

Try:

item = alphabet[12]

Note since Python is zero-indexed, we use the 12th index to find the element in position 13.

Raiyan Chowdhury
  • 281
  • 2
  • 20
-1

You can use the [] operator like this:

alphabet[12]
Gustav Rasmussen
  • 3,720
  • 4
  • 23
  • 53
-1
alphabet = "abcdefghijklmnopqrstuvwxyz"
print(alphabet[12])
Gustav Rasmussen
  • 3,720
  • 4
  • 23
  • 53