Retourner au contenu associé (journal : Troisième partie (sur 11 points))
Posté par Amand Tihon (site web personnel) le 14 mars 2004 à 19:14. En réponse au journal Troisième partie (sur 11 points). Évalué à 3.
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル
# Re: Troisième partie (sur 11 points)
Posté par Amand Tihon (site web personnel) . En réponse au journal Troisième partie (sur 11 points). Évalué à 3.
1) une liste, là on est d'accord.
>>> l = [6, 3, 6, 4, 7, 9, 15, 6, 12, 13, 3]
2) Un dictionnaire.
>>> j = {}
>>> for t in l:
... try: j[t] += 1
... except: j[t] = 1
...
>>> j
{3: 2, 4: 1, 6: 3, 7: 1, 9: 1, 12: 1, 13: 1, 15: 1}
3)
>>> min(l)
3
>>> max(l)
15
>>> min(j)
3
>>> max(j)
15
4) Bon, c'était en python
5) pickle