Fyle interview question

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