> c = [x for x in c if not x == ' '] > oppore, forse meglio: > for i in range(9): > if c[i] == ' ': > del c[i] Hai due scelte principali, o usi la prima forma: c = [x for x in c if not x == ' '] Oppure la seconda (ma modificata, con il range non va bene perché se la lista è maggiore o minore di len 9 non va): num = 0 for i in c: if i == ' ': del c[num] num += 1
------------------------------------------------------ Luciano Ferraro Home page: http://ferraro.wordpress.org/ OpenBot's guide: http://ferraro.wordpress.org/openbot/ OpenBot's source: http://code.google.com/p/openbot-python/
_______________________________________________ Python mailing list Python@lists.python.it http://lists.python.it/mailman/listinfo/python