diff --git a/scratch/getting_data.py b/scratch/getting_data.py index 6f666d6b..68de9325 100644 --- a/scratch/getting_data.py +++ b/scratch/getting_data.py @@ -1,5 +1,6 @@ -# Just stick some data there +# Just stick some data +# with keyword will automatically close the file mentioned in open function with open('email_addresses.txt', 'w') as f: f.write("joelgrus@gmail.com\n") f.write("joel@m.datasciencester.com\n") @@ -330,4 +331,4 @@ def on_error(self, status_code, data): # if instead we wanted to start consuming a sample of *all* public statuses # stream.statuses.sample() -if __name__ == "__main__": main() \ No newline at end of file +if __name__ == "__main__": main()