Does python have a built in feature for finding the id of an item by name? For Example, (To retrieve the Text) Instead of:
list = ['item']
print(list[0])
______________
Output: "item"
Is there something like this? (To retrieve the ID instead of Text)
list = ['item']
print(list['item'])
______________
Output: "0"
If not, what is the simplest way to do this?
Thank in advance!
(If you have questions please ask them in the comments, or if you don't have enough reputation make a post)