Advertisement
mengyuxin

meng.allMyCats.py

Dec 30th, 2017
264
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.32 KB | None | 0 0
  1. catNames = []
  2. while True:
  3.     print('Enter the name of cat ' + str(len(catNames) + 1) +
  4.           ' (or enter nothing to stop.):')
  5.     name = input()
  6.     if name == '':
  7.         break
  8.     catNames = catNames + [name] # List concatenation
  9. print('The cat names are:')
  10. for name in catNames:
  11.     print(' ' + name)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement