copy lines from text file and write without new line code example
Example 1: python readlines without n
temp = file.read().splitlines()
Example 2: python read file without newline
# converts read file into a list without newlines
temp = file.read().splitlines()