This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
try: | |
import sl4a | |
droid = sl4a.Android() | |
except: | |
print("Can't initialize sl4a module!") | |
pass | |
import re | |
import random | |
import time | |
import itertools |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def genumerate(li): | |
#using a generator not to kill memory | |
for item in li: | |
yield li.index(item), item | |
#use case | |
for idx, val in genumerate(biglist): | |
pass #do_something() |
NewerOlder