python get last element of iterator

35

*_, last = iterator # for a better understanding check PEP 448
print(last)

Comments

Submit
0 Comments