本文整理汇总了Python中HW1.reversewords方法的典型用法代码示例。如果您正苦于以下问题:Python HW1.reversewords方法的具体用法?Python HW1.reversewords怎么用?Python HW1.reversewords使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HW1
的用法示例。
在下文中一共展示了HW1.reversewords方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_reversewordsone
# 需要导入模块: import HW1 [as 别名]
# 或者: from HW1 import reversewords [as 别名]
def test_reversewordsone(self):
self.assertEqual(HW1.reversewords("Test one."), "one Test.")
示例2: test_reversewordstwo
# 需要导入模块: import HW1 [as 别名]
# 或者: from HW1 import reversewords [as 别名]
def test_reversewordstwo(self):
self.assertEqual(HW1.reversewords("Punctuation test..."), "test... Punctuation.")
示例3: test_reversewords_2sentence
# 需要导入模块: import HW1 [as 别名]
# 或者: from HW1 import reversewords [as 别名]
def test_reversewords_2sentence(self):
self.assertEqual(HW1.reversewords("Hello world. What's your name?"), "world Hello. name your What's.")
示例4: test_reversewords_string
# 需要导入模块: import HW1 [as 别名]
# 或者: from HW1 import reversewords [as 别名]
def test_reversewords_string(self):
self.assertEqual(HW1.reversewords("Hello world."), "world Hello.")
示例5: test_reversewords
# 需要导入模块: import HW1 [as 别名]
# 或者: from HW1 import reversewords [as 别名]
def test_reversewords(self):
self.assertEqual(HW1.reversewords("Do it right this time."), "Time this right it do.")
示例6: test_reversewords1
# 需要导入模块: import HW1 [as 别名]
# 或者: from HW1 import reversewords [as 别名]
def test_reversewords1(self):
self.assertEqual(HW1.reversewords("Hi, my name is Blah."), "Blah is name my, Hi.")
示例7: test_ReversewordsNostr
# 需要导入模块: import HW1 [as 别名]
# 或者: from HW1 import reversewords [as 别名]
def test_ReversewordsNostr(self):
self.assertEqual(HW1.reversewords(1),"")
示例8: test_three
# 需要导入模块: import HW1 [as 别名]
# 或者: from HW1 import reversewords [as 别名]
def test_three(self):
self.assertEqual(HW1.reversewords("apples nom good"),"good nom apples")
示例9: test_ReversewordsPunct
# 需要导入模块: import HW1 [as 别名]
# 或者: from HW1 import reversewords [as 别名]
def test_ReversewordsPunct(self):
self.assertEqual(HW1.reversewords("one two three. four five"),"three two one. five four.")
示例10: test_reversewords5
# 需要导入模块: import HW1 [as 别名]
# 或者: from HW1 import reversewords [as 别名]
def test_reversewords5(self):
self.assertEqual(HW1.reversewords("99 bottles of beer!"), "beer of bottles 99. ")
示例11: test_reversewords4
# 需要导入模块: import HW1 [as 别名]
# 或者: from HW1 import reversewords [as 别名]
def test_reversewords4(self):
self.assertEqual(HW1.reversewords("the rain, in spain"), "spain in, rain the. ")
示例12: test_reversewords3
# 需要导入模块: import HW1 [as 别名]
# 或者: from HW1 import reversewords [as 别名]
def test_reversewords3(self):
self.assertEqual(HW1.reversewords("The Rain in Spain"), "Spain in Rain The. ")