#remove spaces
#Antonio
# defining the class
class remove_spaces():
#creating a def with self
def __init__(self):
# opening text file with r+ write and read
with open ('new.txt','r+') as file:
# setting lines as the lines read from text
lines = file.readlines()
# removes the spaces from lines
lines = [line.replace(' ', '') for line in lines]
# after replacing opens in write
with open("new.txt", "w") as f:
# replaces all the text with no spaces
for line in lines: f.write(line)
# runs the class
remove_spaces()