word_features = get_word_features(get_words_in_tweets(tweets))
with open('wordFeatures.csv', 'w') as output:
    for ind, item in enumerate(word_features, 1):
        output.write('{}:{}\n'.format(ind, item))
Python export csv data into file