Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

heksadesimal ke ascii

import binascii
     
     
    def hex_to_ascii(hex_str):
        hex_str = hex_str.replace(' ', '').replace('0x', '').replace('	', '').replace('
', '')
        ascii_str = binascii.unhexlify(hex_str.encode())
        return ascii_str
     
     
    hex_input = '54 68 69 73 20 69 73 20 61 6e 20 65 78 61 6d 70 6c 65 2e'
    ascii_output = hex_to_ascii(hex_input)
    print('ascii result is:{0}'.format(ascii_output))
     
    -------------------
    ascii result is:b'This is an example.'
Comment

PREVIOUS NEXT
Code Example
Python :: pypy tinytag 
Python :: forward fill in pyspark 
Python :: NLP text summarization with LSA 
Python :: ing or ly add to str 
Python :: series multiindex values 
Python :: x and y in python 
Python :: ABA Alphabet pyramid 
Python :: rest api save file python 
Python :: get mismatch element in allclose numpy 
Python :: kite order syntax 
Python :: how to reference second line of matrix in python 
Python :: fastai read data from image folders 
Python :: append to multidimensional list python 
Python :: patoolib extract password-protected archives 
Python :: R-squared and MNSE error computation 
Python :: Tree : Top View 
Python :: ERROR: Target path exists but is not a directory, will not continue. 
Python :: Create list element using algebraic operation 
Python :: how to increase width of line in graph of linear regression in matplotlib 
Python :: change between two python 3 version in raspberrry pi 
Python :: get_string python 
Python :: reate the "soup." This is a beautiful soup object: 
Python :: online python formatter and compiler 
Python :: name =input ("hello how are you ") if name==("good"): print ("Thats nice") else print("stfu") 
Python :: additon of multiple duration timestamps python 
Python :: 7616*75 
Python :: ModelCheckpoint 
Python :: two labels on one axis python 
Python :: django voice lib 
Python :: assigning a value to a character in string or text file in python 
ADD CONTENT
Topic
Content
Source link
Name
7+5 =