bytearray() 메서드는 지정된 바이트의 배열인 bytearray 개체를 반환합니다.
입력에서 라인을 읽고(일반적으로 사용자로부터), 후행 새 라인을 제거하여 라인을 문자열로 변환한 다음 반환합니다.
EOF를 읽으면 EOF 오류 예외가 발생합니다.
# 사용자로부터 입력을 받습니다. inputString = input() print('The inputted string is:', inputString)
결과
Python is interesting. The inputted string is: Python is interesting
© 2022 pinfo. All rights reserved.