Advertisement
Guest User

Untitled

a guest
Oct 8th, 2015
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.18 KB | None | 0 0
  1. import os
  2.  
  3. class MyClass:
  4.     def __init__(self):
  5.         self.field = 1
  6.  
  7. instance = MyClass()
  8. for subdir, dirs, files in os.walk("."):
  9.     instance.field = len(dirs)
  10.  
  11. print instance.field
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement