Median 구하기



mwultong Blog


Median 구하기

a = []
a.sort
t_len = len(a)
if (t_len == 0):
   print 'None'
t_center = t_len/2
if (t_len % 2 == 1):
   print a[t_center]
else:
   print (a[t_center-1]+a[t_center]) / 2.0



문자열 순서

a = ''
a = a[::-1]
a=''.join(reversed(a))
print a






크리에이티브 커먼즈 라이센스
Creative Commons License

Posted by gwlee

2008/08/25 01:32 2008/08/25 01:32
Response
0 Trackbacks , 0 Comments
RSS :
http://thegreatgoodplace.com/tt/study/rss/response/18

Trackback URL : http://thegreatgoodplace.com/tt/study/trackback/18

Leave a comment
« Previous : 1 : ... 36 : 37 : 38 : 39 : 40 : 41 : 42 : 43 : 44 : ... 55 : Next »