How to split string with bytes in Python

1 Answer

0 votes
b = b"python,php,c#,java"

elements = b.split(b",")

print(len(elements))
print(elements)


'''
run:

4
[b'python', b'php', b'c#', b'java']

'''

 



answered Sep 8, 2018 by avibootz
...