how to make a hello world program in python?
this is just a test, to check the python stuff, please dont trfm or stfw me.
3 Responses to “how to make a hello world program in python?”
this is just a test, to check the python stuff, please dont trfm or stfw me.
A hello world would look something like this:
print “Hello, world!n”
Or you could define a main function and call that, like this:
def main():
print “Hello, world!n” < -- (this line should be indented)
if (__name__ == '__main__'):
main() <-- (this line should be indented)
(in this way, you could include this module and get its functionality without having it print whenever you included it).
http://www.sprint.com/business/products/products/wirelessHighSpeedData_tabB.jsp
http://www.cingular.com/sbusiness/edge
Report this comment
>>> def hello():
… print “Hello, World!”
…
>>> hello()
Hello, World!
http://www.cc.gatech.edu
Report this comment
There are many more complex answers to this question, and for ones that illustrate the capabilities of Python as an OO language, see the links below.
But this will work:
#!python
print “Hello world.”
http://www.penzilla.net/tutorial/python/intro/index.shtml
Report this comment