我需要快速帮助学校锻炼。我必须从以下代码中删除命令 break 并在没有该 break 命令的情况下使代码正常工作。我将非常感谢您的建议。
city = 'Brooklyn'
searchable = input('Insert searchable symbol: ')
for index,symbol in enumerate(city): # for every index
if symbol == searchable: # control if examining is found
print("Symbol has been found at index: ", index) # if yes, print index
break # stop search
else:
print('Symbol',searchable,'is not represented in word',city)