I am a total novice at Python, and have come across a piece of code that confuses me.
ts, pkt2 = capPort2.wait(1, 45)[0]
The previous line
It means to extract the first item in the list/tuple return by the function.
In [1]: "this is a long sentence".split() Out[1]: ['this', 'is', 'a', 'long', 'sentence'] In [2]: "this is a long sentence".split()[0] Out[2]: 'this'