python get last element of iterator

28

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

Comments

Submit
0 Comments