In early life, Barack Obama lived with his parents but when they divorced he lived with mother, half sister and step father in Jakarta. There he had the advantage of two types of education: Catholic and Islamic. Doubtless this provided him with the readiness to be open to all religions and to understand others.
How clever of his mother or step-father. By this time, although Barack did not see him, his father was gaining high status after his Harvard degree. Not bad for someone who had started as a goatherd! Barack then went to Hawaii living partly with his grandparents, partly with his mother.