Discuss / Python / 调试一下以下代码大概懂了是怎么个流程

调试一下以下代码大概懂了是怎么个流程

Topic source

# -*- coding:utf-8 -*-

from collections import Counter

c = Counter()

for ch in "programmer":

    print(c[ch])

    c[ch] = c[ch]+1

    print(c[ch])

print(c)


  • 1

Reply