impauto
Impauto
자동 입력으로 인생을 더 쉽게 만들 수 있습니다
pip install impauto이 모듈을 사용하는 기본 방법
from impauto import Automated
# Each argument passed will be enter as a str to the input function.
Automated ( 154 )
# use your script as normal
def syracuse ( x ):
step = 0
while x != 1 :
x = ( 3 * x + 1 ) if x % 2 else ( x // 2 )
step += 1
return step
n = int ( input ( "Enter a number: " ))
print ( syracuse ( n ))터미널 입력 메시지를 숨길 수도 있습니다
from impauto import Automated
# Each argument passed will be enter as a str to the input function.
Automated ( 1 , 2 , 3 , show_message = False )기본적으로 주어진 값보다 입력이 더 많으면 예외가 발생합니다. 입력을 무기한으로 반복하려면이 코드를 사용할 수 있습니다.
from impauto import Automated
# Each argument passed will be enter as a str to the input function.
Automated ( "a" , "b" , forever = True )© 2020 저작권 Edhyjox
이 저장소는 MIT 라이센스에 따라 라이센스가 부여됩니다. 자세한 내용은 라이센스를 참조하십시오.