You are viewing a single comment's thread. Return to all comments →
If you don't want to use zip:
def marsExploration(s): return sum(s[i] != 'SOS'[i%3] for i in range(len(s)))
Seems like cookies are disabled on this browser, please enable them to open this website
Mars Exploration
You are viewing a single comment's thread. Return to all comments →
If you don't want to use zip: