HenHanna
2024-06-16 18:10:43 UTC
def diff1(x):
return all(abs(i-j) == 1 for (i, j) in zip(x, x[1:]))
- for (i, j) in zip(x, x[1:]))
- for i, j in zip(x, x[1:]))
Do the above 2 lines compile to the same Bytecode?
return all(abs(i-j) == 1 for (i, j) in zip(x, x[1:]))
- for (i, j) in zip(x, x[1:]))
- for i, j in zip(x, x[1:]))
Do the above 2 lines compile to the same Bytecode?