"Python HelloWorld Class"의 두 판 사이의 차이

(새 문서: ;Python HelloWorld Class ==소스 코드== <source lang='dos'> [root@jmnote ~]# cat hello_world.py #!/usr/bin/python class HelloWorld: def f(self): print "Hello, world!" hw = Hel...)
 
19번째 줄: 19번째 줄:


==같이 보기==
==같이 보기==
*[[Python hellow world]]
*[[Python hello world]]


[[분류: Python]]
[[분류: Python]]

2014년 5월 16일 (금) 16:15 판

Python HelloWorld Class

1 소스 코드

[root@jmnote ~]# cat hello_world.py 
#!/usr/bin/python
class HelloWorld:
	def f(self):
		print "Hello, world!"
hw = HelloWorld()
hw.f()

2 실행 결과

[root@jmnote~]# python hello_world.py
Hello, world!

3 같이 보기

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}