teaching:progappchim:collection_counter_exemple

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentes Révision précédente
Prochaine révision
Révision précédente
teaching:progappchim:collection_counter_exemple [2016/02/10 11:09] villersdteaching:progappchim:collection_counter_exemple [2021/01/18 11:49] (Version actuelle) villersd
Ligne 2: Ligne 2:
  
 Module collections : Module collections :
-  * [[https://docs.python.org/2/library/collections.html+  * [[https://docs.python.org/2/library/collections.html]]
   * [[https://docs.python.org/3/library/collections.html]]   * [[https://docs.python.org/3/library/collections.html]]
  
-<sxh python; title : cherche_wang.py>+<code python cherche_wang.py>
 #!/usr/bin/env python #!/usr/bin/env python
 # -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
Ligne 25: Ligne 25:
 print [c for c in collections.Counter(names).most_common()  if c[1] > 1]  print [c for c in collections.Counter(names).most_common()  if c[1] > 1] 
  
-</sxh>+</code>
  
  • teaching/progappchim/collection_counter_exemple.1455098985.txt.gz
  • Dernière modification : 2016/02/10 11:09
  • de villersd