Skip to content

Latest commit

 

History

History
11 lines (10 loc) · 217 Bytes

name_insight.md

File metadata and controls

11 lines (10 loc) · 217 Bytes

Insights of name

Name dynamically

# use setattr() to 
class Name():
    # self.var0=0 ... self.vark=k
    def __init__(self, count):
        for i in range(count):
            setattr(self, 'var'+str(i), i)