class Solution(object):
def isSubsequence(self, s, t):
"""
:type s: str
:type t: str
:rtype: bool
"""
if len(s) > len(t):
return False
elif len(s) == len(t):
if s != t:
return False
for ch in s:
if ch not in t:
return False
if ch in t:
t = t[t.index(ch)+1:]
return True