This is technically a bass line but it’s also a great chance to explore the concept of a theme and variations. We see this concept come up over and over in popular music and it’s good to start early. The first two measures establish a rhythmic theme. This theme holds up through the entire riff aside from one measure (the fourth).
Though the original riff is played in the key of A I like to move it down to C which helps simplify things. As a teacher for students in the process of learning, it’s important for me not to be a purist unless the specific intention is to play along with a song. By putting songs into keys, tempos and arrangements that make sense with a students skill set we are able to set ourselves up for success and manage a customized learning experience.