Advertisement
Sax

Untitled

Sax
May 20th, 2012
331
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.99 KB | None | 0 0
  1.     used_chars = []
  2.     finales = []
  3.     palabrillas = palabras.keys()
  4.     available = chosen
  5.    
  6.     for word in palabrillas:
  7.         print "Comienza el ciclo"
  8.         print "Available contiene: " + str(available)
  9.         used_chars[:] = []
  10.         actual_word = list(word)
  11.         print "Actual word es: " + str(actual_word)
  12.         for current_char in actual_word:
  13.             if current_char in available:
  14.                 print "Si, la " + str(current_char) + " esta en " + str(available)
  15.                 used_chars.append(current_char)
  16.                 print "Appendee " + current_char
  17.                 available.remove(current_char)
  18.                 print "Las available ahora son " + str(available)
  19.         sorted(actual_word)
  20.         sorted(used_chars)
  21.         available[:] = []
  22.         for i in range(len(chosen)):
  23.             available[i] = chosen[i]
  24.         print "Termina el ciclo"
  25.         if actual_word == used_chars:
  26.             finales.append(word)
  27.             print "Appendee " + word + " a las finales"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement