Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
fireattack
· 8y ago · 0 comments
Does this python example actually work? What does line.split()[2] do?
Comments
[–]
mehrdadn
8y ago
https://onlinegdb.com/SkTP0yfW7
[–]
fireattack
OP
8y ago
Thanks. I thought /PATTERN/ { print $3 } is about to extract 3rd group of the regex.
[–]
detaro
8y ago
it splits line into substrings at spaces, and then selects the third substring.