federated/main.py
def check_type(x: str, inp_type: type) -> bool:
    """Function for checking if a string can be converted to a certain type.

    Args:
        x (str): String to convert.\n
        inp_type (type) : Type.

    Returns:
        bool: If x can be converted or not.
    """
    try:
        inp_type(x)
        return True
    except:
        return False
Function for checking if a string can be converted to a certain type.

    Args:
        x (str): String to convert.\n
        inp_type (type) : Type.

    Returns:
        bool: If x can be converted or not.
    
Function for checking if a string can be converted to a certain type.
Function for checking if a string can be converted to a certain type .
def check_type(x: str, inp_type: type) -> bool:
    try:
        inp_type(x)
        return True
    except:
        return False
def check_type ( x : str , inp_type : type ) -> bool : try : inp_type ( x ) return True except : return False
Function for checking if a string can be converted to a certain type.
Function for checking if a string can be converted to a certain type .
"""Function for checking if a string can be converted to a certain type.

    Args:
        x (str): String to convert.\n
        inp_type (type) : Type.

    Returns:
        bool: If x can be converted or not.
    """
If x can be converted or not.
If x can be converted or not .
bool
x
str
String to convert.\n
String to convert . \ n
inp_type
type
None