fork download
  1. course = "Python Programming"
  2. # 将空格替换为下划线
  3. course_under = course.replace (" ", "_")
  4. print(course_under)
  5.  
  6. # 统计字母'o'出现的次数
  7. count_o = course.count('o')
  8. print("字母o出现的次数:", count_o)# your code goes here
Success #stdin #stdout 0.09s 14056KB
stdin
Standard input is empty
stdout
Python_Programming
字母o出现的次数: 2