Advertisement
Guest User

Untitled

a guest
Oct 28th, 2011
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.53 KB | None | 0 0
  1. def stolpec_prost(stolpec,razpored):
  2.     for i in razpored:
  3.         if stolpec == i[0]:
  4.             return False
  5.     else:
  6.         return True
  7.  
  8.  
  9. def prosti_stolpci(razpored):
  10.     zasedeni=[]
  11.     for x in razpored:
  12.         zasedeni.append(x[0])
  13.     prosti = []
  14.     print (zasedeni)
  15.     for y in "abcdefgh":
  16.         if y != zasedeni:
  17.             prosti.append(y)
  18.     return prosti
  19.  
  20.  
  21.  
  22. stolpci = "abcdefgh"
  23. vrstice = "12345678"
  24.  
  25. print (stolpec_prost("b",["a4", "c7", "d2"]))
  26. print (prosti_stolpci(["a4", "c7", "d2"]))
  27.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement