Fyle Interview Question

write code to fetch given data in O(1) in python