Advertisement
Guest User

Untitled

a guest
May 29th, 2015
236
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.59 KB | None | 0 0
  1. my_name = # Oh dear, this is a SyntaxError!
  2.  
  3. my_year = # Same here! And these variables are never used!
  4.  
  5. crawl = [
  6.   "Glasshouse",
  7.   "Lowther",
  8.   "Yates's",
  9.   "Parish",
  10.   "Society",
  11.   "Salvation"
  12. ] # bars would be a better name but hey ho, it lets you be all poetic below
  13.  
  14. for bar in crawl:
  15.   # only two spaces indent! Another SyntaxError!
  16.   if visited(bar):  # visited is undefined and you'll get a NameError
  17.     print(bar + " [X]")  # use format strings, also the block if is wasteful
  18.   else:                  # if you're only changing the one character
  19.     print(bar + " [ ]")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement