making it readable
This commit is contained in:
parent
bd6463d038
commit
478a2d2b6f
5
efa.py
5
efa.py
|
|
@ -18,7 +18,7 @@ def searchStop(name):
|
|||
points = x["Points"]
|
||||
stops = []
|
||||
for Point in x["Points"]:
|
||||
stops.append([Point.split(sep="|")[0], Point.split(sep="|")[3]])
|
||||
stops.append([Point.split(sep="|")[0], Point.split(sep="|")[3], Point.split(sep="|")[2]])
|
||||
|
||||
return stops
|
||||
|
||||
|
|
@ -26,10 +26,11 @@ def searchStop(name):
|
|||
def selectStop(stops):
|
||||
print("Your query matches the following stops:\n")
|
||||
for i, stop in enumerate(stops):
|
||||
print(f"({i}) {stop[1]}")
|
||||
print(f"({i:>2d}) {stop[1]}, {stop[2]}")
|
||||
selection = int(input("\nPlease select... "))
|
||||
stopId = stops[selection][0]
|
||||
stopName = stops[selection][1]
|
||||
stopCity = stops[selection][2]
|
||||
return stopId, stopName
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue