本文整理汇总了Python中HW1.reversewordletters方法的典型用法代码示例。如果您正苦于以下问题:Python HW1.reversewordletters方法的具体用法?Python HW1.reversewordletters怎么用?Python HW1.reversewordletters使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HW1
的用法示例。
在下文中一共展示了HW1.reversewordletters方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_reversewordletterstwo
# 需要导入模块: import HW1 [as 别名]
# 或者: from HW1 import reversewordletters [as 别名]
def test_reversewordletterstwo(self):
self.assertEqual(
HW1.reversewordletters("This sentence has a lot of words."), "sihT ecnetnes sah a tol fo sdrow."
)
示例2: test_reversewordlettersone
# 需要导入模块: import HW1 [as 别名]
# 或者: from HW1 import reversewordletters [as 别名]
def test_reversewordlettersone(self):
self.assertEqual(HW1.reversewordletters("This is a test."), "sihT si a tset.")
示例3: test_no_punctuation_rwl
# 需要导入模块: import HW1 [as 别名]
# 或者: from HW1 import reversewordletters [as 别名]
def test_no_punctuation_rwl(self):
self.assertEqual(HW1.reversewordletters("A long string without punctuation"), "A gnol gnirts tuohtiw noitautcnup")
示例4: test_reversewordletters_string
# 需要导入模块: import HW1 [as 别名]
# 或者: from HW1 import reversewordletters [as 别名]
def test_reversewordletters_string(self):
self.assertEqual(HW1.reversewordletters("A civic testset is nice."), "A civic testset si ecin.")
示例5: test_reversewordletters1
# 需要导入模块: import HW1 [as 别名]
# 或者: from HW1 import reversewordletters [as 别名]
def test_reversewordletters1(self):
self.assertEqual(HW1.reversewordletters("Hi, my name is Blah."), "iH, ym, eman, si, halB")
示例6: test_reversewordletters
# 需要导入模块: import HW1 [as 别名]
# 或者: from HW1 import reversewordletters [as 别名]
def test_reversewordletters(self):
self.assertEqual(HW1.reversewordletters("Do it right this time?"), "oD ti thgir siht emit?")
示例7: test_four
# 需要导入模块: import HW1 [as 别名]
# 或者: from HW1 import reversewordletters [as 别名]
def test_four(self):
self.assertEqual(HW1.reversewordletters("hey you"),"yeh uoy")
示例8: test_five
# 需要导入模块: import HW1 [as 别名]
# 或者: from HW1 import reversewordletters [as 别名]
def test_five(self):
self.assertEqual(HW1.reversewordletters("one two three four five six seven"), "eno owt eerht ruof evif xis neves")
示例9: test_ReversewordlettersPunct
# 需要导入模块: import HW1 [as 别名]
# 或者: from HW1 import reversewordletters [as 别名]
def test_ReversewordlettersPunct(self):
self.assertEqual(HW1.reversewordletters("one two three. four five"),"eno owt eerht. ruof evif.")
示例10: test_reversewordletters5
# 需要导入模块: import HW1 [as 别名]
# 或者: from HW1 import reversewordletters [as 别名]
def test_reversewordletters5(self):
self.assertEqual(HW1.reversewordletters("99 bottles of beer!"), "99 selttob fo reeb!")
示例11: test_reversewordletters4
# 需要导入模块: import HW1 [as 别名]
# 或者: from HW1 import reversewordletters [as 别名]
def test_reversewordletters4(self):
self.assertEqual(HW1.reversewordletters("the rain, in spain."), "eht niar, ni niaps.")
示例12: test_reversewordletters3
# 需要导入模块: import HW1 [as 别名]
# 或者: from HW1 import reversewordletters [as 别名]
def test_reversewordletters3(self):
self.assertEqual(HW1.reversewordletters("The Rain in Spain."), "ehT niaR ni niapS.")