利用函数进行字母的大小写转换
upper():所有字母大写
lower():所有字母小写
capitalize():首字母大写,其他字母小写
title():每个单词首字母大写,其他小写
#encoding:UTF-8
msg = 'www.BAIDU.com.123'
print(msg.upper()) #upper()函数,将所有字母都转换成大写
print(msg.lower()) #lower()函数,将所有字母都转换成小写
print(msg.capitalize()) #capitalize()函数,将首字母都转换成大写,其余小写
print(msg.title()) #title()函数,将每个单词的首字母都转换成大写,其余小写
word1 = input()
word2 = input()
num = 0
for i in word1:
if word2.upper() == i.upper():
num = num + 1
else:
continue
print(num)

京公网安备 11010502036488号