This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Edited for python 3 | |
import tweepy #https://github.com/tweepy/tweepy | |
import csv | |
#Twitter API credentials | |
consumer_key = "" | |
consumer_secret = "" | |
access_key = "" | |
access_secret = "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Before checking we strip leading and trailing characters | |
# Check if the line is not empty | |
with open("empty.txt", 'r') as inp, open('out.txt', 'w') as out: | |
for line in inp: | |
if line.strip(): | |
out.write(line) | |
# Before checking we strip only trailing characters | |
# Check if the line is not empty | |
with open("empty.txt", 'r') as inp, open('out.txt', 'w') as out: |