I think the following books are good books. This is the first book I read while studying Python. This book was a good book, so I feel like I'm familiar with Python (until now). Thanks.
** "Introduction to Python 3" O'Reilly Japan (February 3, 2017, first edition, sixth edition) **
here, I think that the explanation has failed for a moment, so I will describe it. I've forgotten quite a bit, but when I notice it, I'll add it to this article.
Below, the relevant book is quoted
Why do you need an empty string? If you want to assemble a new string from another string, you first need a blank note.
>>> bottles = 99 >>> base = '' \ >>> base + ='current inventory:' # inventory >>> base += str(bottles) >>> base 'current inventory: 99'
In the case of the above example, ** I think it is not necessary to have an empty string. ** ** Below ↓.
>>> bottles = 99
>>> base = 'current inventory: ' #stock
>>> base += str(bottles)
>>> base
'current inventory: 99'
I don't know what I want to explain. .. .. (I will omit the improvement plan.)
If you have any comments, please let us know. : candy: I just wrote an article (like a good idea?) To get more familiar with good books. Also, if I find something, I will add it. Even within the range I have noticed so far, I think there were certainly some.
Recommended Posts