Problem Description:
when I run it the program keyword variable is “stop” when it was set to “”
Bug appears at this link:
project
Browser/OS/Device:
chormeOS
Problem Description:
when I run it the program keyword variable is “stop” when it was set to “”
Bug appears at this link:
project
Browser/OS/Device:
chormeOS
Youir question… is really confusing? Try this? Idk what you want tho
keyword = ""
character = ""
filelines = []
f = open('main.simple', 'r')
filelines = f.readlines()
for i in range(len(filelines)):
line = filelines[i].strip()
if keyword == "stop":
raise ValueError("keyword variable is not cleared")
for i in range(len(line)):
character = line[i]
keyword = keyword + character
if keyword == "stop":
print("stop")
keyword = ""
thank you so much it works perfectly, but I was wondering what I did wrong
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.