I learned programming on a TRS-80 and a Apple II. you don’t need an i7, an i3, Core2Duo, Pentium Pro, or a PowerPC 603 to learn. CPU power is not that important. mostly you are typing and reading text. I always say, “3.2Ghz… we’re typing fast now!”
the things I consider important are:
the keyboard. if you do not like typing on what is in front of you the you will be annoyed about using the laptop. too loud, too squishy, or just feels wrong.
trackpads that are hard to use make for a bad experience. clicks should feel transparent. it should not get in the way of work and if it does, because it does not track, it will be frustrating. yes, you can add a mouse. and you should. but the track pad is part of it.
the display is a factor. most cheap laptops have a 1366 x 768 screen. fine for learning. annoying as you use it. the 200 pixels that a 1680×1050 or 1980×1050 screen makes a difference. you will see a little more code in the window and that helps.
my advice? find something that is free or almost free that somebody feels is too old or slow.