Skip to content

Commit 392b7ab

Browse files
committed
Commit
1 parent 285490d commit 392b7ab

File tree

3 files changed

+15
-1
lines changed
  • more-python-for-beginners
  • python-for-beginners/11 - Collections

3 files changed

+15
-1
lines changed

more-python-for-beginners/05 - Mixins/demo.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,14 @@ def framework(item):
2323
if isinstance(item, Loggable):
2424
item.log()
2525

26+
class JustLog(Loggable):
27+
def __init__(self):
28+
self.title = 'Just logging'
29+
30+
31+
2632
sql_connection = SqlDatabase()
33+
jutlog = JustLog()
2734
framework(sql_connection)
35+
36+
framework(jutlog)

more-python-for-beginners/06 - Managing the file system/files.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
from pathlib import Path
22
cwd = Path.cwd()
33

4+
print('Path ' + cwd.drive)
5+
46
demo_file = Path(Path.joinpath(cwd, 'demo.txt'))
57

68
# Get the file name

python-for-beginners/11 - Collections/arrays.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,7 @@
22
scores = array('i')
33
scores.append(97)
44
scores.append(98)
5-
print(scores)
5+
print(scores)
6+
7+
scores2 = ('i',97,98)
8+
print(scores2)

0 commit comments

Comments
 (0)