2010-02-12から1日間の記事一覧
__getitem__・・・ググったらしっかり出てきましたが、どうしてもlist参照時にエラーが・・・
コードをこうしてみると・・・ #!/usr/bin/env python# -*- coding:utf-8 -*-class algo: def __init__(self,n,m): self.data = [] def per(self,n): x = n while n > 0: n = n - 1 x = x * n self.data.append(x) return result def com(self,n,m): a = n -…
とあるコードについて・・・#!/usr/bin/env python# -*- coding:utf-8 -*-class algo: def __init__(self): self.data = [] def per(self,n): x = n while n > 0: n = n - 1 x = x * n self.data.append(x) return result def com(self,n,m): a = n - 1 b = …