`string.encode('utf-8')` is more common but I guess this is mostly cosmetic :)