def string2bytes(item):
    """
    Converts string to bytes format.
    'A' -> b'A'
    """
    if type(item) == str:
        return bytes(item, 'utf-8')
    else:
        return "Wrong data type expected string, received %s" % str(type(item).__name__)