This code is just printing the last name from the file. The name has space between. So I don\'t understand why it is giving me such result.
Data in file