Skip to content

Instantly share code, notes, and snippets.

@Khazbs
Created August 13, 2020 15:48
Show Gist options
  • Select an option

  • Save Khazbs/d68c898dd4d3429d05526a5c4c71d44e to your computer and use it in GitHub Desktop.

Select an option

Save Khazbs/d68c898dd4d3429d05526a5c4c71d44e to your computer and use it in GitHub Desktop.
Reads file.txt, splits each row by whitespace and takes second column values
column = [line.strip().split()[1] for line in open('file.txt', 'r', encoding='utf-8')]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment