Skip to content

Commit a0eaab9

Browse files
committed
Indents
1 parent 0c95f4b commit a0eaab9

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
lines changed

ch19/capitals.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
def process_cities(filename):
22
with open(filename, 'rt') as file:
3-
for line in file:
4-
line = line.strip()
5-
if 'quit' in line.lower():
6-
return
7-
country, city = line.split(',')
8-
city = city.strip()
9-
country = country.strip()
10-
print(city.title(), country.title(), sep=',')
3+
for line in file:
4+
line = line.strip()
5+
if 'quit' in line.lower():
6+
return
7+
country, city = line.split(',')
8+
city = city.strip()
9+
country = country.strip()
10+
print(city.title(), country.title(), sep=',')
1111

1212
if __name__ == '__main__':
1313
import sys

ch19/capitals2.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
def process_cities(filename):
22
with open(filename, 'rt') as file:
3-
for line in file:
4-
line = line.strip()
5-
if 'quit' == line.lower():
6-
return
7-
country, city = line.split(',')
8-
city = city.strip()
9-
country = country.strip()
10-
print(city.title(), country.title(), sep=',')
3+
for line in file:
4+
line = line.strip()
5+
if 'quit' == line.lower():
6+
return
7+
country, city = line.split(',')
8+
city = city.strip()
9+
country = country.strip()
10+
print(city.title(), country.title(), sep=',')
1111

1212
if __name__ == '__main__':
1313
import sys

0 commit comments

Comments
 (0)