composition example 2
This commit is contained in:
parent
fa416050e0
commit
d846736b1b
10
python-temel/composition.2.py
Normal file
10
python-temel/composition.2.py
Normal file
|
@ -0,0 +1,10 @@
|
|||
class Square:
|
||||
pass
|
||||
|
||||
class Board:
|
||||
def __init__(self):
|
||||
self.squares = [[Square()] * 8 for i in range(8)]
|
||||
|
||||
board = Board()
|
||||
print(board)
|
||||
|
Loading…
Reference in New Issue
Block a user