Files
Pyarmor-Static-Unpack-1shot/tests/tokenized/iter_unpack.txt
Michael Hansen 391ba6502d Migrate additional tests which previously didn't have reference source to
the new test system, including new reference source.
2019-10-07 17:06:08 -07:00

9 lines
180 B
Plaintext

def map_with_index ( func , lst ) : <EOL>
<INDENT>
res = [ ] <EOL>
for i , x in enumerate ( lst ) : <EOL>
<INDENT>
res . append ( func ( i , x ) ) <EOL>
<OUTDENT>
return res <EOL>