I Need Help With A Python Script Because I'm Stupid
Go to solution
Solved by codesidian,
for tweet_info in twt:
if tweet_info != last_screen_name:
user_d.write(last_screen_name)
user_d.close()
user_d = open('users_database.log','r')
for user_sort in user_d:
blah
if user_sort != last_screen_name:
blah
user_d.close()
user_d = open('users_database.log','w')
last_screen_name = tweet_info.user.screen_name
What are the elements of 'twt' and 'user_d'? By the sounds of it you're either checking if the last username is equal to an element that doesn't even contain the current username or setting 'last_screen_name', 'twt' or 'user_d' incorrectly.

Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now