Right now I have a string array and I want to loop through the string array and compare the value at one index with the value at the next index. For example, if I was doing this in Java, the code would be something like this:
string[] some = ["IP", "IP", "ADDRESS", "2342.42.2", "IP", "ASDF"];
for (int i = 0 ; i < some.length() ; i++)
if (some[i] == "IP" && some[i+1] == "ADDRESS")
int ipaddress = some[i+2];
I know that Python is a bit different, but basically I am trying to find the first IP ADDRESS. How can I compare the current element and the next one in a loop?