Hello,
I try to learn python by following the audicity page.
Now I have the following problem.
I have two strings a and b
Now I have to check if the characters of b are all in a.
But they do have to be in the same order.
So I thought about this solution.
length = len(b)
start = 1
while start < length :
check = a.find (b[start])
if check == -1 :
return False
start = start + 1
return True
But according to the site this can be solved in a one-liner.
So can someone give me pointers how this can be done and if my solution can
work.
Roelof
_______________________________________________
Tutor maillist - [email protected]
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor