nums = [5, 12, 7, 9, 21, 7, 14]count_seven = nums.count(7)print("数字7出现的次数:", count_seven)
Standard input is empty
数字7出现的次数: 2
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!