diff options
author | Kyle K <kylek389@gmail.com> | 2020-09-13 16:49:33 -0500 |
---|---|---|
committer | Kyle K <kylek389@gmail.com> | 2020-09-13 16:49:33 -0500 |
commit | 40de87995b901f72a4dd1f394af3c20c24c73541 (patch) | |
tree | d73614d825f53152b60239779309e0002f6d3283 /foo.py | |
parent | a3d3368d9f024052632dc87b5d52e26a223c7869 (diff) | |
download | PythonPractice-40de87995b901f72a4dd1f394af3c20c24c73541.tar.gz PythonPractice-40de87995b901f72a4dd1f394af3c20c24c73541.tar.bz2 PythonPractice-40de87995b901f72a4dd1f394af3c20c24c73541.zip |
small class exmaple with a global variable
Diffstat (limited to 'foo.py')
-rw-r--r-- | foo.py | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -0,0 +1,10 @@ +class Foo: + pass +def hello(): + print('hello, world') +x = 13 + +class Square(): + def __init__(self, x): + self.inital = x + self.squared = x**2 |