美文网首页
【Python】在cmd中运行Python程序

【Python】在cmd中运行Python程序

作者: Natsuka | 来源:发表于2018-08-24 19:34 被阅读3次

    cd +py文件所在路径
    python +文件py

    C:\Users\Administrator>cd C:\Users\Administrator\Desktop\lianxi
    
    C:\Users\Administrator\Desktop\lianxi>python untitled0.py
    [['var1', 1.0], ['var2', 'a']]
    {'var1': 1.0, 'var2': 'a'}
    [['var1', 2.0], ['var2', 'b']]
    {'var1': 2.0, 'var2': 'b'}
    [['var1', 3.0], ['var2', 'c']]
    {'var1': 3.0, 'var2': 'c'}
    [['var1', 4.0], ['var2', 'a']]
    {'var1': 4.0, 'var2': 'a'}
    [['var1', 5.0], ['var2', 'b']]
    {'var1': 5.0, 'var2': 'b'}
    [['var1', 6.0], ['var2', 'c']]
    {'var1': 6.0, 'var2': 'c'}
    [['var1', 7.0], ['var2', 'a']]
    {'var1': 7.0, 'var2': 'a'}
    [['var1', 8.0], ['var2', 'b']]
    {'var1': 8.0, 'var2': 'b'}
    [['var1', 9.0], ['var2', 'c']]
    {'var1': 9.0, 'var2': 'c'}
    [['var1', 10.0], ['var2', 'a']]
    {'var1': 10.0, 'var2': 'a'}
    [{'var1': 1.0, 'var2': 'a'}, {'var1': 2.0, 'var2': 'b'}, {'var1': 3.0, 'var2': 'c'}, {'var1': 4.0, 'var2': 'a'}, {'var1': 5.0, 'var2': 'b'}, {'var1': 6.0, 'var2': 'c'}, {'var1': 7.0, 'var2': 'a'}, {'var1': 8.0, 'var2': 'b'}, {'var1': 9.0, 'var2': 'c'}, {'var1': 10.0, 'var2': 'a'}]
    
    C:\Users\Administrator\Desktop\lianxi>
    

    相关文章

      网友评论

          本文标题:【Python】在cmd中运行Python程序

          本文链接:https://www.haomeiwen.com/subject/cipiiftx.html