0
私はこのPythonスクリプトを持っていますが、.stripが "/ n"をどのように削除できるかはわかりません。ドキュメントから、文字列から削除される.strip()を提供し、文字列w.oを返します。/nは特別な場合です.strip()は無視して文字列を返します。Python String Strip()メソッドを理解していません
from urllib import urlopen
WORD_URL = "http://learncodethehardway.org/words.txt"
WORDS = []
# load up the words from the website
for word in urlopen(WORD_URL).readlines():
WORDS.append(word.strip())
print "*" * 134
print urlopen(WORD_URL).readlines()
print "*" * 134
print WORDS
素晴らしいありがとう –