Africa's largest snake and one of the six largest snake species in the world (along with the green anaconda, reticulated python, Burmese python, Indian python, and amethystine python), specimens may approach or exceed 6 m (20 ft). The southern subspecies is generally smaller than its northern relative. The snake is found in a variety of habitats, from forests to near deserts, although usually near sources of water. The African rock python kills its prey by constriction and often eats animals up to the size of antelope, occasionally even crocodiles. The snake reproduces by egg-laying. Unlike most snakes, the female protects her nest and sometimes even her hatchlings. The snake is widely feared, though it very rarely kills humans. Although the snake is not endangered, it does face threats from habitat reduction and hunting.
Africa's largest snake species and one of the world's largest, the typical African rock python adult measures 3 to 3.53 m (9 ft 10 in to 11 ft 7 in), with only unusually large specimens likely to exceed 4.8 m (15 ft 9 in). Reports of specimens over 6 m (19 ft 8 in) are considered reliable, although larger specimens have never been confirmed. Weights are reportedly in the range of 44 to 55 kg (97 to 121 lb), per one study adults are expected to weigh only up to 32.2 kg (71 lb). Exceptionally large specimens may weigh 91 kg (201 lb) or more. One specimen, reportedly 7 m (23 ft 0 in) in length, was killed by K. H. Kroft in 1958 and was claimed to have had a 1.5 m (4 ft 11 in) juvenile Nile crocodile in its stomach. An even larger specimen considered authentic was shot in The Gambia and measured 7.5 m (24 ft 7 in). The snake varies considerably in body size between different areas. In general, it is smaller in highly populated regions, such as in southern Nigeria, only reaching its maximum length in areas such as Sierra Leone, where the human population density is lower. Males are typically smaller than females.
The African rock python's body is thick and covered with colored blotches, often joining up in a broad, irregular stripe. Body markings vary between brown, olive, chestnut, and yellow, but fade to white on the underside. The head is triangular and is marked on top with a dark brown “spear-head” outlined in buffy yellow. Teeth are many, sharp, and backwardly curved. Under the eye, there is a distinctive triangular marking, the subocular mark. Like all pythons, the scales of the African rock python are small and smooth. Those around the lips possess heat-sensitive pits, which are used to detect warm-blooded prey, even in the dark. Pythons also possess two functioning lungs, unlike more advanced snakes which have only one, and also have small, visible pelvic spurs, believed to be the vestiges of hind limbs. The southern subspecies is distinguished by its smaller size (adults averaging about 2.4 to 4.4 m in length), smaller scales on top of the head, and a smaller or absent subocular mark.
The African rock python is found throughout almost the whole of sub-Saharan Africa, from Senegal east to Ethiopia and Somalia and south to Namibia and South Africa. Python sebae sebae ranges across central and western Africa, while Python sebae natalensis has a more eastern and southerly range, from southern Kenya to South Africa. In 2009, an African rock python was found in the Florida Everglades. It is feared to be establishing itself as an invasive species alongside the already-established Burmese python. Feral rock pythons were also noted in the 1990s in the Everglades.
The African rock python inhabits a wide range of habitats, including forest, savanna, grassland, semi-desert, and rocky areas. It is particularly associated with areas of permanent water and is found on the edges of swamps, lakes and rivers. The snake also readily adapts to disturbed habitats and so is often found around human habitation, especially cane fields.
Like all pythons, the African rock python is non-venomous and kills its prey by constriction. After gripping the prey, the snake coils around it, tightening its coils every time the victim breathes out. Death is thought to be caused by cardiac arrest rather than by asphyxiation or crushing. The African rock python feeds on a variety of large rodents, monkeys, warthog, antelopes, fruit bats, monitor lizards and even crocodiles in forest areas, and on rats, poultry, dogs and goats in suburban areas. Occasionally, it may eat the cubs of big cats such as leopards, lions, and cheetahs and puppies of big dogs such as hyenas and African Wild Dogs. However, these encounters are very rare, as the adult cats can easily kill pythons or fend them away.
Reproduction occurs in the spring. African rock pythons are oviparious, laying between 20 and 100 hard-shelled, elongated eggs in an old animal burrow, termite mound or cave. The female shows a surprising level of maternal care, coiling around the eggs, protecting them from predators and possibly helping to incubate them, until they hatch around 90 days later. It was recently discovered in a manner unusual for snakes in general and pythons in particular that the female guards the hatchlings for up to two weeks after they hatch from their eggs in order to protect them from predators. Hatchlings are between 45–60 cm (17.5–23.5 in) in length and appear virtually identical to adults, except with more contrasting colors. Individuals may live for over 12 years in captivity.