def add(a,b):
return a+b
print(add(1,2))
print(add('abc', 'def'))
print(add([1, 2, 3], [4, 5, 6]))
a=[12, 'abcde', 4+2j, [3,4,5]]
a.append('add')
print(a);
print(4+5)
print("Hello World!")
# -*- coding: utf-8 -*-
print(4 + 5)
print(12 - 32)
print((4 + 5) * 6)
print(4 + 5 * 6)
print(9 / 5) # 파이썬2.x 버전에서는 정수/정수 연산 결과는 정수
print(9.0 / 5.0)
print(9 / 5.0)
print('Hello')
print("Hi there!")
a = 'My name is '
b = 'Amenda'
print(a + b)
import sys
print(sys.version)
print()
print(sys.version_info)
# file: cal.py
import calendar
calendar.prmonth(2014, 11)
# execfile('/Users/yhhan/Documents/workspace/python/01/cal.py')
exec(open("./files/cal.py").read())
참고 문헌: 파이썬(열혈강의)(개정판 VER.2), 이강성, FreeLec, 2005년 8월 29일