#-*-coding:utf-8-*- ''' 通过扫描来判断两个字符串是否匹配 ''' a = raw_input('input string a\n') b = raw_input('input string b\n') if len(a) != len(b): print 'these two string are not matching' else: str_n = len(a) for i in range(str_n): if a[i] != b[i]: print 'these two string are not matching' break else: if i == str_n-1: print 'these two string are matching'
chapter 6 exercise 6_5(b)
最新推荐文章于 2024-06-11 16:25:51 发布