The best way to learn a programming language is to do it, find some project that you want to work on and starts working on it. I have a bad habit of just watching hours long youtube tutorial on a language ? but then after that I barely remembers anything, but it gives you an idea of what u can do with it. Normally what i do is I watch the video first, then starts to work on the project at the same time searching more on how I do it. Slowly coding your project, I am sure you will be able to remember what u coded
Books are definitely one of the best resources to learn. Books are the most coherent source of learning, and each book is the result of a writer's many years of endeavor, so that the author selects and writes one part of his book obsessively. Books are also the most complete source of learning and include everything.
I believe learning programming from the book for beginners is very informative and useful because it involves all the concepts, and I suggest this at least to begin with. Also, programming books as a good reference can always help you whenever necessary.