dws*_*ein 0 python for-loop increment
我刚开始使用Python(在我的带下有大量的VBA)所以我正在玩一些简单的语法.
我写了这个简单的for循环,但输出似乎错了.我不能让变量'c'递增.
这是我的代码:
class Card:
def county(self):
for n in range(0,13):
c = 0
c = c + 1
print c
pick_card = Card()
print pick_card.county()
Run Code Online (Sandbox Code Playgroud)
输出只是'1'打印13次,然后是"无"
我究竟做错了什么?