Why won't my python code print anything?

前端 未结 6 949
梦如初夏
梦如初夏 2020-12-21 11:52

A program I wrote wasn\'t printing anything when I executed it out of the terminal, so I tried the ran the following code

import sys

#!/usr/bin/python

def          


        
6条回答
  •  心在旅途
    2020-12-21 12:42

    In python your code doesn't have to be in a function, and all functions have to be explicitly called.

    Try something like this instead:

    #!/usr/bin/python
    
    import sys
    
    print  "hell0\n"
    

提交回复
热议问题