ip_arrayn seems to only exist to store the unmodified lines from my_file. ip_array is then created by iterating over each line stored in ip_arrayn and then calling str.rstrip on them.
This PR skips that step and creates ip_array by iterating over the lines from my_file directly and immediately running str.rstrip on each one.
ip_arrayn
seems to only exist to store the unmodified lines frommy_file
.ip_array
is then created by iterating over each line stored inip_arrayn
and then callingstr.rstrip
on them.This PR skips that step and creates
ip_array
by iterating over the lines frommy_file
directly and immediately runningstr.rstrip
on each one.