choosing the right programming language would be not most significant to provide security, but nevertheless it bears some importance. There are some publications about this providing both black box analysis (for example 1st link) and reasoning (2nd link).
Software projects related to Functional Safety are facing the same concerns. Thus, looking to the software related part of IEC 61508 will give you also ideas about suitable languages and constraints to apply for them.
Your question is not a simple one. Security relies on several factors. Is not only the programming language, but mainly the amount of good or bad code lines that programmers write. There is also the quality of application write in a certain language. Personally I preferred JAVA. But when I decide to write an application, security is not the only issue. So, if your code is good I believe that you can use JAVA or Python with no problems. I suggest that you read this link (maybe they help).
choosing the right programming language would be not most significant to provide security, but nevertheless it bears some importance. There are some publications about this providing both black box analysis (for example 1st link) and reasoning (2nd link).
Software projects related to Functional Safety are facing the same concerns. Thus, looking to the software related part of IEC 61508 will give you also ideas about suitable languages and constraints to apply for them.
Complementing the other great answers: Regardless of the programming language you choose, be sure that the framework you use is well proven. A good proof is that many other projects rely on it. For instance, you have Django for Python, which is widely used to build web applications.