How to use replace on bytes in Python

1 Answer

0 votes
b = b"python php"

result = b.replace(b"php", b"java")

print(result)

'''
run:

b'python java'

'''

 



answered Sep 7, 2018 by avibootz
...