In this era of technology, programming has become more significant than ever before. Python and C++ are both widely used programming languages. Python, the most popular programming language in today’s world, is a high-level object-oriented language whereas C++, the language behind most operating systems, is a low-level object-oriented language. In this paper, we present a comparative study of Python and C++. This paper discusses the introduction to these languages, their memory management techniques, and the reasons behind their program execution speed. Furthermore, we analyzed the execution time and memory used by multiple algorithms in both the languages with best, average, and worst cases. They are also compared with respect to the benefits and issues related to them. Results indicate that C++ is faster than Python in execution speed but Python serves as a better language for beginners due to its simplicity. Moreover, for the best results, the language should be selected according to the type of project.
Keywords:
Subject: Computer Science and Mathematics - Algebra and Number Theory
Copyright: This open access article is published under a Creative Commons CC BY 4.0 license, which permit the free download, distribution, and reuse, provided that the author and preprint are cited in any reuse.
Preprints.org is a free preprint server supported by MDPI in Basel, Switzerland.