a = 'GeeksforGeeks'
 
# initialising a byte object
c = b'GeeksforGeeks'
 
# using encode() to encode the String
# encoded version of a is stored in d
# using ASCII mapping
d = a.encode('ASCII')
 
# checking if a is converted to bytes or not
if (d==c):
    print ("Encoding successful")
else : print ("Encoding Unsuccessful")

# initialising a String 
a = 'GeeksforGeeks'
 
# initialising a byte object
c = b'GeeksforGeeks'
 
# using decode() to decode the Byte object
# decoded version of c is stored in d
# using ASCII mapping
d = c.decode('ASCII')
 
# checking if c is converted to String or not
if (d==a):
    print ("Decoding successful")
else : print ("Decoding Unsuccessful")

