Skip to content
Snippets Groups Projects
Commit 2fb0cc49 authored by 2269767's avatar 2269767
Browse files

Werkte niks van en was een slecht idee

parent 38260ba2
No related branches found
No related tags found
No related merge requests found
def fromstring(string):
uitkomst = ''
close = 0
string = [x for x in string]
waitcheck = True
check = True
print(string)
for i in range(len(string)):
if string[i] == ' ':
pass
elif string[i] == "\\":
uitkomst += 'Abstraction('
close += 1
elif string[i] == ".":
waitcheck = False
else:
if check and i > 1:
uitkomst += f"Abstraction("
close += 1
uitkomst += f"Variable('{string[i]}'), "
if not waitcheck:
check = False
uitkomst = uitkomst[:-2]
uitkomst += close * ")"
print(uitkomst)
fromstring(r"\a b. a")
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment