In Python, we can merge two dictionary objects very easily. First, we create two dictionaries then we can merge and sort the dictionaries based on the values. In python 2.x we can use the following code, Python 2.x In the below example, the two dictionaries are created and then merge the dictionary keys with the… Read More »
In the following code, we are assigning default values to the dictionary. First, we can create the dictionary and assigning the values to the names. Then, we are trying to fetch the dictionary value based on the key. If there is no such key, we will assign a default value.
Let us take a real-time example of the banking system. The bank wants to offer a loan only to the active premium customers who are not on the defaulter’s list. For this, we are using the following code in python. Method: 1 Method: 2 In this example, if the bank gives a loan to the… Read More »
AES stands for Advanced Encryption Standard. AES is the first and only publicly accessible cipher approved by the National Security Agency(NSA). There is multiple AES package available in python. In this post, we will see the implementation with two different packages in python Method1 – “crypto” package Method2 – “cryptography” package Using the “Crypto” AES package In this… Read More »