# take hexadecimal string
      hex_str = "0x68656c6c6f"[2:]
      # convert hex string to ASCII string
      bytes_array = bytes.fromhex(hex_str)
      ascii_str = bytes_array.decode()
      # printing ASCII string
      print('ASCII String:', ascii_str)
      
      Python language logo

      Hex to ASCII

      0

      0

      avatar
      Mahendra Kumar
      beginner
      encoding

      Python Program to Convert Hex to ASCII

      0 Comments

        Add Comment

        Log in to add a comment

        Codiga - All rights reserved 2022.