Advertisement
dmesticg

Untitled

Nov 9th, 2019
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. tweet = "hello!! dude"
  2. fixedTweet = ""
  3. tweetsFile = "tweets1.txt"
  4. keywordsFile = "key1.txt"
  5.  
  6. def removePunct(string):
  7. punctuationList = '''!()-[]{};:'"\,<>./?@#$%^&*_~'''
  8. for char in string:
  9. if char not in punctuationList:
  10. fixedString = fixedTweet + char
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23. with open(tweetsFile) as tf:
  24. lines = tf.read()
  25. lines = lines.split("\n")
  26. for tweet in lines:
  27. tweet = lines.split(" ")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement