Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有没有人有一种优雅的方式来处理部分名称中的通配符?
我正在寻找的是这样的:
[DEFAULT] foo = 1 bar = 2 [ABC???] foo = 11 [XYZ???] bar = 20
也许像
[s for s in my_config_parser.sections() if s.startswith('ABC')]