Ad
  • Default User Avatar

    E.g. in Python:

    def count_digit(number, digit, base=10, from_base=10):
      ...
      
    count("133", "3")  # is the same as count("133", "3", 10, 10)
    
    # so you don't need to convert the number
    #                                vv
    # and the digit 3 is 2 times in 133
    # therefore the result is 2
    

    Regards,

    suic