By way of symbolic computation with the help of Maple, diverse of exact solutions for a variable-coefficient Kadomtsev–Petviashvili equation are successfully derived, based on the Hirota bilinear method. These new solutions named the lump solution and the interaction solutions between the lump and the exponential function, lump and the hyperbolic function and also kinky breather–soliton and kinky periodic-soliton and strip soliton solutions have greatly enriched the existing literature on the variable-coefficient Kadomtsev–Petviashvili equation. Particularly, we have obtained the interaction solutions between the lump solution and the exponential function and the lump solution and the hyperbolic function for the variable-coefficient Kadomtsev–Petviashvili equation. Via the three-dimensional images, density and contour images with the help of Maple, the physical characteristics of these waves are described very well. That will be widely used to explain plenty of interesting the physical phenomenon in the fields of gas, plasma, optics, acoustics, heat transfer, fluid dynamics, classical mechanics and so forth.