方法一:
class seasons:
Spring,Summer,Autum,Winter = range(4)
方法二:
from collections import namedtuple
Seasons = namedtuple('Seasons','Spring Summer Autum Winter')._make(range(4))
方法一:
class seasons:
Spring,Summer,Autum,Winter = range(4)
方法二:
from collections import namedtuple
Seasons = namedtuple('Seasons','Spring Summer Autum Winter')._make(range(4))