파이썬 프로그램을 두 번 이상 다시 시작하지 않고 실행할 수있게하려면 어떻게해야합니까? 다음은 코드입니다.파이썬 프로그램을 두 번 이상 실행하는 방법
words = [str(x) for x in raw_input().split(' ')]
string = raw_input()
def word_search():
for x in words:
while len(string)==30:
if x in string:
print x, 'appeared', string.count(x), 'time(s)'
else:
print x, 'appeared', string.count(x), 'time(s)'
break
else:
print 'Your longer string should not be less or more than 30.'
word_search()
을'종료 메인 루프에서
break
을 사용할 수 (N) : word_search()' – xiver77