def main(): sentence = "All good things come to those who wait." words = ex25.break_words(sentence) print(words) sorted_words = ex25.sort_words(words) print(sorted_words) ex25.print_first_word(sorted_words) ex25.print_last_word(sorted_words) print(sorted_words) sorted_words = ex25.sort_sentence(sentence) print(sorted_words) ex25.print_first_and_last(sentence) ex25.print_first_and_last_sorted(sentence)
import ex25 sentence = "All good things come to those who wait." words = ex25.break_words(sentence) print words sorted_words = ex25.sort_words(words) print sorted_words ex25.print_first_word(words) ex25.print_last_word(words) sorted_words = ex25.sort_sentence(sentence) print sorted_words ex25.print_first_and_last(sentence) ex25.print_first_and_last_sorted(sentence) help(ex25)
from hello import print_hello import ex25 print_hello() ex25.break_words("sting like a bee") ex25.print_first_and_last("sting like a bee") ex25.print_first_word("sting like a bee") ex25.print_last_word("sting like a bee") ex25.sort_sentence("sting like a bee") ex25.sort_words("sting like a bee")
import sys, os sys.path.append(os.getcwd() + '/Course') #add path for library import ex25 # must add path before importing ex25.print_first_and_last("Hello there")
import ex25 sentence = "All good things come to those who wait." #words = break_words(sentence) words = ex25.break_words(sentence) words # sorted_words = ex25.sort_words(words) sorted_words # ex25.print_first_word(words) #打印了个All ex25.print_last_word(words) #打印了个wait. words # ex25.print_first_word(sorted_words) #打印了个All。 ex25.print_last_word(sorted_words) # 打印了个who sorted_words # sorted_words = ex25.sort_sentence(sentence) sorted_words # ex25.print_first_and_last(sentence) #C: 打印第一个All和最后一个字wait。 ex25.print_first_and_last_sorted(sentence) # D 打印第一个All和最后一个sorted的句子who。 print("-------- THE END ----------") print("---------下面是采用了from ex25 import *") from ex25 import * sentence = "All good things come to those who wait." #words = break_words(sentence) words = break_words(sentence) words # sorted_words = sort_words(words) sorted_words # print_first_word(words) #打印了个All print_last_word(words) #打印了个wait. words # print_first_word(sorted_words) #打印了个All。 print_last_word(sorted_words) # 打印了个who
from ex25a import adder import ex25 print(adder(3, 4)) line = "this is new line not the previous one" words = ex25.break_words(line) print(words) print(ex25.sort_words(words)) ex25.print_first_word(words) ex25.print_last_word(words) print(ex25.sort_sentence(line)) ex25.print_first_and_last(line) ex25.print_first_and_last_sorted(line)
import ex25 sentence = "All good things come to those who wait." words = ex25.break_words(sentence) print words sorted_words = ex25.sort_words(words) print sorted_words first_word = ex25.print_first_words(sorted_words) last_word = ex25.print_last_word(sorted_words) sorted_words_s = ex25.sort_sentence(sentence) print sorted_words_s first_and_last_words = ex25.print_first_and_last(sentence) first_and_last_sorted = ex25.print_first_and_last_sroted(sentence)
import ex25 #print break_words("djsafauroew fj dklasj jfdl ajsfl ldj ls") #print sort_words("dflajfkld f falj dlsa lj lfsald jfla") #print_first_word([3, 4, 5, 6, 7]) #print_last_word([3, 4, 5, 6, 7]) #print sort_sentence("dflajfkld f falj dlsa lj lfsald jfla") ex25.print_first_and_last("dflajfkld f falj dlsa lj lfsald jfla") ex25.print_first_and_last_sorted("dflajfkld f falj dlsa lj lfsald jfla") help(ex25.break_words)