返回

数组-如何修复python中的打印内存地址

发布时间:2022-04-20 20:46:38 247
# node.js

我一直试图用我的代码解决这个问题,在控制台中打印内存地址。我怀疑这与反复浏览;单词表;列表,但我在谷歌或S.O上找不到适合我的补丁。

#wordlist is actually around 500 words long.
wordlist = ['games', 'happy', 'gxems', 'hpapy]
def get_possible_letters(word):
  letters = "abcdefghijklmnopqrstuvwxyz"
  possible_letters = letters
  count = 0
  for i in word:
    if i in letters:
      possible_letters.remove(i)
  return possible_letters
def get_most_information():
  score = 0
  top_score = 27
  for i in wordlist:
    score = len(letters) - len(get_possible_letters(i))
    if score < top_score:
      top_score = score
  return top_score

print(get_most_information)
特别声明:以上内容(图片及文字)均为互联网收集或者用户上传发布,本站仅提供信息存储服务!如有侵权或有涉及法律问题请联系我们。
举报
评论区(0)
按点赞数排序
用户头像