def decode_args(args, stdin_encoding):
 return [(arg.decode(stdin_encoding) if (type(arg) == bytes) else arg) for arg in args]

def decode_args ( args , stdin_encoding ) : return [ ( arg . decode ( stdin_encoding ) if ( type ( arg ) == bytes ) else arg ) for arg in args ]
convert all bytes ags to str by decoding them using stdin encoding .