Thursday

python sum of list/array and any all


::accumulators
def countall(it):return sum(1 for x in it )
if any(x>5 for x in xs): ...
if all(x>y>z for x,y,z in zip(xs,ys,ys)):

from itertools import izip
if all(x>y>z for x,y,z in izip(xs,ys,zs)):

print max(i for i, x in enumerate(xs) if x > 0)

with operator:
with open('myfile.txt') as f:
for aline in f: print alien[3]


more...

No comments:

here is powershell script on how to get list of files from changesets associated with one tfs task

$dllPath = "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\...