Dimitris Kougioumtzis Blog About technology

Convert string to bytes object python

Category Python

Posted on Oct. 14, 2018



Convert string to bytes object python


1
2
3
my_simple_string = 'test'
bytes_obj = bytes(my_simple_string, 'utf-8')
print(bytes_obj)

About

My name is Dimitris Kougioumtzis and i work as a Web developer at Rapidbounce Company

Elsewhere