Skip to content

Latest commit

 

History

History
49 lines (32 loc) · 798 Bytes

readme.md

File metadata and controls

49 lines (32 loc) · 798 Bytes

City namer

Run from the terminal or import into your own code.

Terminal

Run with or without arguments.

Without arguments

python city_namer.py

Generates 1 city name by default.

With arguments

python city_namer.py 5

Generates 5 city names.

Import

Call with or without arguments.

Without arguments

from city_namer import city_names

for city in city_names():
    print(city)

Generates 1 city name by default.

With arguments

from city_namer import city_names

for city in city_names(5):
    print(city)

Generates 5 city names.

Limitation

Note that the number of city names available is limited by the number of words ending with "city", and beyond this limit specifying a higher number will not generate more words.