input関数
while loop と input関数
String
while True:
word = input('Enter:')
if word == 'ok':
break
print('next')
Enter:ok
Process exited with code: 0
Enter:adads
next
Enter:ojnihuhbd
next
Enter:
Intger
while True:
word = input('Enter:')
num = int(word)
if num == 100:
break
print('next')
Enter:1
next
Enter:100
Process exited with code: 0
コメント