Yes a snake can eat a human. In fact there have been several documented cases of snakes swallowing humans. The largest snake in captivity an anaconda named “Mancha” reportedly swallowed a human in 1999. The victim was a six-year-old boy who climbed into the snake’s enclosure at a zoo in Peru.
There are also reports of wild snakes swallowing humans. In June 2018 a 23-year-old man in India was reportedly swallowed whole by a python. The man a farmer named Akbar had been cutting grass in a field when the snake attacked. His body was found inside the snake which had been killed by villagers.
And in March 2017 a woman in Indonesia was reportedly killed and swallowed by a 7m-long python. The woman 54-year-old Wa Tiba went missing while checking her vegetable garden. Her body was found inside the snake which had been killed by villagers.
So yes snakes can and do eat humans. But it’s important to keep in mind that these incidents are extremely rare. Snakes usually prefer to eat smaller prey such as rodents or birds. And most snakes will only attack humans if they feel threatened or if they are starving.