(num: str)
return num == num[::-1].replace('6', '#').replace('9', '6').replace('#', '9')
Another implementation.
Another implementation.
Another implementation .
def is_strobogrammatic2(num: str):
    """Another implementation."""
    return num == num[::-1].replace('6', '#').replace('9', '6').replace('#', '9')
def is_strobogrammatic2 ( num : str ) : return num == num [ : : - 1 ] . replace ( '6' , '#' ) . replace ( '9' , '6' ) . replace ( '#' , '9' )