输出打印时如何在python中创建新变量

输出打印时如何在python中创建新变量,python,python-2.7,Python,Python 2.7,我想使用一个变量=“登录Twitter,访问某人的个人资料,保存搜索,推广此推文,阻止,使用位置推文,传播位置,你的列表,创建新列表,复制推文链接,嵌入此推文”你想要吗 output= Sign in to Twitter Visit someone's profile Saved search Promote this Tweet Block Tweet with location Spread the Location Your list Create a new list Copy T

我想使用一个变量=“登录Twitter,访问某人的个人资料,保存搜索,推广此推文,阻止,使用位置推文,传播位置,你的列表,创建新列表,复制推文链接,嵌入此推文”

你想要吗

output=

Sign in to Twitter
Visit someone's profile
Saved search
Promote this Tweet
Block
Tweet with location
Spread the Location
Your list
Create a new list

Copy Tweet link
Embed this Tweet
输出打印:

[''‘登录Twitter’、‘访问某人的个人资料’、‘保存的搜索’、‘推广此推文’、‘阻止’、‘使用位置推文’、‘传播位置’、‘您的列表’、‘创建新列表’、''、‘复制推文链接’、‘嵌入此推文’、']


你能把你的帖子说清楚吗?你是在问如何用新行存储字符串吗?您正在尝试存储字符串数组吗?请详细说明一下。是的,先生,我想尝试存储一个字符串数组。如何在python中生成输出?
# -*- coding: UTF-8 -*-
import os
import sys
if __name__ == '__main__':

    var = '''
    Sign in to Twitter
    Visit someone's profile
    Saved search
    Promote this Tweet
    Block
    Tweet with location
    Spread the Location
    Your list
    Create a new list

    Copy Tweet link
    Embed this Tweet
    '''
   output = var.split('\n')
    print (var)
    print(output)