[Python] input()과 sys.stdin
sys.stdin 알고리즘 문제를 풀 때, 파이썬의 input()은 실행시간이 느려서 자주 시간초과가 난다. 이럴때 sys모듈의 stdin을 사용하면 더 빠르게 input이 가능하다.. 고 하는데, 나는 input()과 sys.stdin의 차이점을 알고싶었다. input() vs sys.stdin input() input() 파이썬의 내장함수이고, 공식 문서의 'Built in function'에가면 해당 내용을 읽어 볼 수 있다. input()에 대한 파이썬 공식 문서 If the prompt argument is present, it is written to standard output without a trailing newline. The function then reads a line from ..
2021.02.09