回覆列表
  • 1 # 學習小迷

    count = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]

    order = "yes"

    index = -1

    end = 0

    keywords = ["1","2","3","4","5","6","1","1","1",",",",",",",".",".",",",

    ",",",",",",",",","]

    i = 0

    while order == "yes" or order == "YES":

    keywords[i] = input("input the keyword\n")

    i = i + 1

    end = end + 1

    order = input("continue?yes^\n")

    for keyword in keywords:

    index += 1

    j = 0

    with open("C:\\Users\\Administrator\\Desktop\\1.txt") as file:

    for i in file:

    for A in i:

    if keyword[j] == A:

    j = j + 1

    else:

    j = 0

    if j == len(keyword):

    count[index] += 1

    j = 0

    file.close()

    for index in range(0,end):

    print(keywords[index] + " " +str(count[index]))

  • 2 # 一定在轉角

    不管這個關鍵詞是好的還是差的,我相信你不需要去數不需要去計算就能感覺到,數過以後計算過以後只能是你自己騙自己的一個牽強的理由!如果關鍵詞是貶義詞,那你就給自己一個牽強的微笑吧!一笑而過比什麼都好,要哭就躲在被窩裡哭個夠吧!如果是好的關鍵詞,我相信你就偷著樂吧,因為不需要你去計算你也能明白對方想表達的含義!

  • 中秋節和大豐收的關聯?
  • 為什麼很多人說劉邦和朱元璋都是從兄弟的屍體中踏入帝王的殿堂的?