bytes() 메서드는 지정된 크기와 데이터로 초기화된 불변 바이트 개체를 반환합니다.
지정된 크기 및 초기화 값의 바이트 개체를 반환합니다.
string = "Python is interesting." # 'utf-8'로 인코딩하기 arr = bytes(string, 'utf-8') print(arr)
결과
b'Python is interesting.'
10 파이썬에서 현재 시간을 구하는 방법
13 python에서 TikTokLive.types.errors.LiveNotFound 에러 해결방법
17 파이썬에서 The driver cannot recognize the specified command parameter 에러 해결방법
13 Pytube 쓸 때 pytube.exceptions.RegexMatchError: get_throttling_function_name: could not find match for multiple 에러 해결방법
11 파이썬에서 string, datetime으로 정렬하기
© 2022 pinfo. All rights reserved.