Changes between Version 9 and Version 10 of Python


Ignore:
Timestamp:
06/16/06 19:43:13 (18 years ago)
Author:
atzm
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Python

    v9 v10  
    130130    return my_dict 
    131131}}} 
     132 
     133== リストから重複を取り除く == 
     134 * ただし順番は勝手にソートされる. 
     135 
     136{{{ 
     137#!python 
     138try: 
     139    set, frozenset 
     140except NameError: 
     141    from sets import Set as set, ImmutableSet as frozenset 
     142 
     143def uniq(sequence): 
     144    return list(set(sequence)) 
     145}}}