cities = ["Durban", "Johannesburg", "Roodepoort", "Cape Town"]

with open("/home/dax/PycharmProjects/python/cities.txt", "w") as file:
    for city in cities:
        print(city, file=file)

cities = []

with open("/home/dax/PycharmProjects/python/cities.txt", "r") as file:
    for city in file:
        cities.append(city)


for city in cities:
    print(city, end="")

c8cd9cb6cf852ecd266d0acfe094a1798ca581d2
<mask token>

<mask token>
with open('/home/dax/PycharmProjects/python/cities.txt', 'w') as file:
    for city in cities:
        print(city, file=file)
<mask token>
with open('/home/dax/PycharmProjects/python/cities.txt', 'r') as file:
    for city in file:
        cities.append(city)
for city in cities:
    print(city, end='')

cities = ['Durban', 'Johannesburg', 'Roodepoort', 'Cape Town']
with open('/home/dax/PycharmProjects/python/cities.txt', 'w') as file:
    for city in cities:
        print(city, file=file)
cities = []
with open('/home/dax/PycharmProjects/python/cities.txt', 'r') as file:
    for city in file:
        cities.append(city)
for city in cities:
    print(city, end='')

cities = ["Durban", "Johannesburg", "Roodepoort", "Cape Town"]

with open("/home/dax/PycharmProjects/python/cities.txt", "w") as file:
    for city in cities:
        print(city, file=file)

cities = []

with open("/home/dax/PycharmProjects/python/cities.txt", "r") as file:
    for city in file:
        cities.append(city)


for city in cities:
    print(city, end="")
