We present in this article a Python script, based on a methodology to obtain the electric field produced by n electric charges. This tool was implemented in courses of electromagnetism and its laboratory in three institutions of higher education. The aim of this work was to incorporate information and communication technologies (ICTs) at the physics subjects, in accordance with the programs promoted by the Colombian Ministry of Education. We wanted to connect the students with sensory experiences of the physical phenomena that allow them to improve their experience of learning of subjects traditionally studied through the board. Finally, in this work, an interactive computational code was obtained, in which the electric field of the discrete and continuous charge distributions can be calculated, for the classical problems that are shown in an electrical physics course.