Ok so here is the code. I dont plan on typing out the error in the log. Its not needed to copy the code. Its basically saying that there is an issue where 'L' is not type int.
def i_am_here(path):
print(path)
lst = []
num = []
x = 0
y = 0
for i in path:
try:
int(i)
num.append(int(i))
except ValueError:
if i == 'r' or i == 'R':
new = ''.join(num)
lst.append(new)
lst.append('r')
num = []
if i == 'L' or i == 'l':
new = ''.join(num)
lst.append(new)
lst.append('l')
num = []
new = ''.join(num)
lst.append(new)
lst = lst[1:len(lst)]
print(lst)
for i in range(len(lst)):
if lst[i] == 'r':
print(lst[i+1])
ok, so im 99% sure this is just a bug as when I use:
for i in path:
try:
int(i)
num.append(int(i))
except ValueError:
if i == 'r' or i == 'R':
lst.append(num)
lst.append('r')
num = []
if i == 'L' or i == 'l':
lst.append(num)
lst.append('l')
num = []
everything works just fine. Any thoughts? I was going to submit an issue ticket but before I did I thought I might ask.