I am building a simple AI assistant in python but the if statement is not working

I am building a simple AI assistant in python and so far everything has worked pretty well. The voice recognition and text to speech are working also fine. I wanted to make it work like, I am going to speak something and depending on the input it would answer some simple questions. But with the if statement I tried to make conditions depending on the input but it doesn’t get executed instead the else statement gets executed.

Converting a pdf to a csv with steps using python

So, as evident from the title, I want to convert a pdf to a csv so that I could use that data in my project. The problem is that the pdf formatting is not at all suitable for conversion to a csv file. For a human reader, the file makes complete sense but for a computer, it is extremely difficult to comprehend. It is difficult for me to explain here but I would encourage my fellow data scientists to help me find a solution for the same.

Sum up the values inside nested python dictionaries if they have the same key

I want to change values in nested python dictionaries if they have the same key. My original dict contains several nested dicts with a different length. If a nested dict has the same key as a previous nested dict, the value of the previous key should be added to the value of the current key. This is basically stacking the values on top of each other. For better understanding: