From 29286a52e0644892f1591e71985ec9241825d920 Mon Sep 17 00:00:00 2001 From: Samedhaa Date: Fri, 31 Aug 2018 23:41:01 +0300 Subject: [PATCH 1/2] commenting some commands commenting some commands --- basic_commands.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/basic_commands.py b/basic_commands.py index b15d929..8c401fc 100644 --- a/basic_commands.py +++ b/basic_commands.py @@ -1,5 +1,5 @@ >>> a = ['a', 'b', 'c', 'd', 'e'] ->>> for index, item in enumerate(a): print index, item +>>> for index, item in enumerate(a): print index, item # enumerate function will generate an index for the item + item it self. ... 0 a 1 b @@ -37,6 +37,7 @@ str1 = "this is string example....wow!!!"; str2 = "exam"; +# find function will print the position for the first character of the string if it's found! print str1.find(str2); print str1.find(str2, 10); print str1.find(str2, 40); From 5b2574f755698f71cbc011db8b1ea25a64caa7fb Mon Sep 17 00:00:00 2001 From: Shahul Es Date: Fri, 19 Oct 2018 22:18:16 +0530 Subject: [PATCH 2/2] renamed local file location --- Twitter-Data-Analysis/extract_twitter_data.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Twitter-Data-Analysis/extract_twitter_data.py b/Twitter-Data-Analysis/extract_twitter_data.py index b2558dd..178df35 100644 --- a/Twitter-Data-Analysis/extract_twitter_data.py +++ b/Twitter-Data-Analysis/extract_twitter_data.py @@ -28,7 +28,7 @@ class MyListener(StreamListener): def on_data(self, data): try: - with open('C:\\Users\\ujjwal.karn\\Desktop\\Tweets\\python.json', 'a') as f: #change location here + with open('location/file_name.txt', 'a') as f: #change location here f.write(data) return True except BaseException as e: