from math import *
# s = "http://sports.sina.com.cn/"
s = input("请输入字符串:")
print("字符串中字母 t 出现的次数:%d" % s.count("t"))
print("字符串中 \"com\" 子字符串出现的位置:%d" % s.index("com"))
print("字符串中所有的 \".\" 替换为 \"-\": %s" % s.replace(".", "-"))
print("采用正向切片方式提取 \"sport\":%s" % s[7: 12])
print("采用反向切片方式提取 \"sina\":%s" % s[-12: -8])
print("字符串的字母全部变为大写:%s" % s.upper())
print("字符串的总字符个数:%d" % len(s))
print("在字符串后拼接子字符串 \"index\":%s" % s + "index")