Python 3.x – Convert a string into a string of bytes

I want to convert a string into a string of bytes. The chain comes exactly in this form. Coding & # 39; сp1251 & # 39 ;. How to do it well?

str = & # 39; см³ & # 39;

bytes (str, & # 39; cp1251 & # 39;)

As a result, I get
UnicodeEncodeError: the codec & # 39; charmap & # 39; can not encode the character & # 39; xb3 & # 39; in position 2: the character is assigned to