iter_and_pack_by_number(lst)

an anonymous user · July 25, 2021
my_list =[0, 'root', 'disable', 'dynamic', 'pages', 'login', 'sensitive', 'registration', 'screen', 'flag_secure', 'application', 'frida', 'blurring', 'instrumentation', 'mechanism', 'recent', 'debugger', 'information', 'restrict', 'stronger', 'anti', 'capture', 'appsview', 'strengthen', 'code', 'data', 'exported', 'use', 'protection', 'default', 'ensure', 'hide', 'improve', 'runtime', 'copy', 'paste', 'expired', 'impelement', 'frequency', 'adding', 'feature', 'instrument', 'attempts', 'avoid', 'escape', 'authentication', 'encryption', 'components', 'device', 'char', 'verification', 1, 'detection', 'frequency', 'dynamic', 'emulator', 'encoding', 'encrypt', 'encryption', 'ensure', 'escape', 'expired', 'exported', 'feature', 'flag_secure', 'frame', 'frida', 'device', 'generated', 'hardcoding', 'headers', 'hide', 'impelement', 'implement', 'improve', 'information', 'input', 'instrument', 'instrumentation', 'integrity', 'disable', 'version', 'verification', 'char', 'access', 'adding', 'alert', 'anti', 'application', 'appsview', 'array', 'attempts', 'authentication', 'avoid', 'blurring', 'capture', 'character', 'default', 'check', 'code', 'come', 'components', 2, 'implement', 'version', 'frequency', 'dynamic', 'emulator', 'encoding', 'encrypt', 'encryption', 'ensure', 'escape', 'expired', 'exported', 'feature', 'flag_secure', 'frame', 'frida', 'device', 'generated', 'hardcoding', 'headers', 'hide', 'impelement', 'improve', 'information', 'input', 'instrument', 'instrumentation', 'integrity', 'disable', 'detection', 'verification', 'char', 'access', 'adding', 'alert', 'anti', 'application', 'appsview', 'array', 'attempts', 'authentication', 'avoid', 'blurring', 'capture', 'character', 'default', 'check', 'code', 'come', 'components', 3, 'access', 'version', 'frequency', 'dynamic', 'emulator', 'encoding', 'encrypt', 'encryption', 'ensure', 'escape', 'expired', 'exported', 'feature', 'flag_secure', 'frame', 'frida', 'device', 'generated', 'hardcoding', 'headers', 'hide', 'impelement', 'implement', 'improve', 'information', 'input', 'instrument', 'instrumentation', 'integrity', 'disable', 'detection', 'verification', 'default', 'adding', 'alert', 'anti', 'application', 'appsview', 'array', 'attempts', 'authentication', 'avoid', 'blurring', 'capture', 'char', 'character', 'check', 'code', 'come', 'components']


def iter_and_pack_by_number(lst):
    answer = []
    values = []
    for index in range(len(lst)):
        if (isinstance(lst[index], int)) and index != 0:
            answer.append(values)
            values = []
        values.append(lst[index])
    
    return answer


print(iter_and_pack_by_number(my_list))
Output

Comments

Please sign up or log in to contribute to the discussion.