python ignore first value in generator
itercars = iter(cars)
next(itercars)
for car in itercars:
# do work
python ignore first value in generator
itercars = iter(cars)
next(itercars)
for car in itercars:
# do work
how to loop through a list and skip first element in c#
foreach(var item in list.Skip(1))
{
System.Diagnostics.Debug.WriteLine(item.ToString());
}
//If you want to skip any other element at index n, you could write this:
foreach(var item in list.Where((a,b) => b != n))
{
System.Diagnostics.Debug.WriteLine(item.ToString());
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us