calculate frequency of a characters in Python using for-loop, while-loop, python dictionary, and dictionary comprehension with detailed explanations.