数据来自百度百科
https://baike.baidu.com/item/C++%E5%85%B3%E9%94%AE%E5%AD%97/5773813#reference-[1]-3111818-wrap
包含C++ 98/03/11 的关键字。
然后利用Python 按字典序排序后输出到文件中。
if __name__ == '__main__':
f = open("test.in", "r")
out = open("test.out", "w")
lst = []
for i in f:
lst.append(i)
lst.sort()
for i in lst:
out.write(i)
out.close()
f.close()
最终结果
alignas alignof asm auto bool break case catch char char16_t char32_t class const const_cast constexpr continue decltype default delete do double dynamic_cast else enum explicit export extern false float for friend goto if inline int long mutable namespace new noexcept nullptr operator private protected public register reinterpret_cast return short signed sizeof static static_assert static_cast struct switch template this thread_localthrow true try typedef typeid typename union unsigned using virtual void volatile wchar_t while



