有一个文件“words.txt”我必须访问它
WORDLIST_FILENAME = 'words.txt'
class Message(object):
def __init__(self, text):
self.text = text
'''
Initializes a Message object
text (string): the message's text
a Message object has two attributes:
self.message_text (string, determined by input text)
self.valid_words (list, determined using helper function load_words)
'''
# pass #delete this line and replace with your code here
def get_message_text(self):
'''
Used to safely access self.message_text outside of the class
Returns: self.message_text
'''
# pass #delete this line and replace with your code here
有人能帮我吗
相关问题 更多 >
编程相关推荐