Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Need your small help
#1
HIII,

I want to count a number of words that contains string a. for e.g. 

a = Sophia
[sophia, Sophia beautiful, smile of Sophia,  Sophia's car ]

please tell me how to solve it .




Huh Huh Huh Huh
Reply
#2
Sorry, but we will not "tell" you how to solve it, but we will "help" you as you work to solve it.  First and foremost, please post the code you have so far and the complete error code (if any).  Be sure and post them between the proper 'code tags'.  Refer to the Help Document for instructions on how to post code properly.
If it ain't broke, I just haven't gotten to it yet.
OS: Windows 10, openSuse 42.3, freeBSD 11, Raspian "Stretch"
Python 3.6.5, IDE: PyCharm 2018 Community Edition
Reply
#3
You almost have working code. Wrap those strings in quotes, and try again :)
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020