Write a Python program to count occurrences of a substring in a string

  • برمجة
  • برمجة بايثون

Write a Python program to count occurrences of a substring in a string.

الأجوبة

str1 = 'The quick brown fox jumps over the lazy dog.'
print()
print(str1.count("fox"))
print()
هل كان المحتوى مفيد؟

تبحث عن مدرس اونلاين؟

محتاج مساعدة باختيار المدرس الافضل؟ تواصل مع فريقنا الان لمساعدتك بتأمين افضل مدرس
ماهو التخصص الذي تبحث عنه؟
اكتب هنا...