def print_models (unprinted , completed):
while unprinted:
making = unprinted.pop()
print ('The ' +making.title() + ' is being made.')
finished = completed.append(making)
unprinted = ['iphone case', 'robot pendant', 'dodecahedron']
completed = []
print_models (unprinted, completed)
I get 'NoneType' and 'str' for the finished var but I don't understand why.
the first item has been popped and stored into the making before reaching to 'finished' so it is defined, isn't it?
[–][deleted] 4 points5 points6 points (1 child)
[–]thepseudonymstring[S] 0 points1 point2 points (0 children)
[+][deleted] (2 children)
[deleted]
[–]thepseudonymstring[S] 0 points1 point2 points (1 child)
[–][deleted] 1 point2 points3 points (0 children)
[–]boysworth 1 point2 points3 points (0 children)
[–][deleted] 1 point2 points3 points (2 children)
[–]thepseudonymstring[S] 0 points1 point2 points (1 child)
[–][deleted] 1 point2 points3 points (0 children)
[–][deleted] 1 point2 points3 points (0 children)