Skip to content

Instantly share code, notes, and snippets.

@MSWon
Created May 27, 2018 09:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MSWon/e366412a522997b97b921fbabf9e8cde to your computer and use it in GitHub Desktop.
Save MSWon/e366412a522997b97b921fbabf9e8cde to your computer and use it in GitHub Desktop.
Python code for reading .txt file
def read_data(filename):
with open(filename, 'r',encoding='utf-8') as f:
data = [line.split('\t') for line in f.read().splitlines()]
data = data[1:] # header 제외 #
return data
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment