teaching:progappchim:collection_counter_exemple

Différences

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

Lien vers cette vue comparative

Prochaine révision
Révision précédente
teaching:progappchim:collection_counter_exemple [2016/02/10 11:09] – créée 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 -*-
 """ """
-Recherche du nombre d'occurence des auteurs d'un article+Recherche du nombre d'occurences des noms d'auteurs d'un article
 On copie dans all_authors les noms des auteurs On copie dans all_authors les noms des auteurs
 http://www.ncbi.nlm.nih.gov/pubmed/26799652 http://www.ncbi.nlm.nih.gov/pubmed/26799652
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.1455098947.txt.gz
  • Dernière modification : 2016/02/10 11:09
  • de villersd