Python Basic and Data Structures 1st Day

his script includes a function to sort a list of numbers without using the built-in sorted() function, a CustomStack class with the specified methods, and a function to count the frequency of each character in a string.

bubble_sort(nums): Sorts a list of numbers using the bubble sort algorithm. CustomStack class: Simulates a stack with push, pop, is_empty, and peek methods. char_frequency(s): Returns a dictionary with the frequency count of each character in a string.