python 2.7 - How to find the position of letters in a list of words? -
in list of words :
acquired almanac insult joke hymn gazelle amazon eyebrows affix vellum
for e.g.:how find position of 'a'; 'a'
def find_a(input): i, c in enumerate(input): if c == 'a': yield
will return character position of as
Comments
Post a Comment