Python Forum
how to write a code for term that can't begin or end with a stopword
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
how to write a code for term that can't begin or end with a stopword
#3
Punctuation could be removed with word.strip(string.punctualtion) from string module. It contains all those symbols: !"#$%&\'()*+,-./:;<=>?@[\\]^_`{|}~. Or just word.strip("'.,@?!-")
"As they say in Mexico 'dosvidaniya'. That makes two vidaniyas."
https://freedns.afraid.org
Reply


Messages In This Thread
RE: how to write a code for term that can't begin or end with a stopword - by wavic - Mar-18-2017, 02:58 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How to write a dict code in python ariellea88 4 1,245 Oct-31-2023, 08:45 AM
Last Post: buran
  New learner in Python, and need help on the term explanation BaicaiPy 3 1,446 Oct-15-2022, 03:31 PM
Last Post: Yoriz
  how to write code demon_calcifer 1 1,717 Nov-16-2021, 04:09 PM
Last Post: Larz60+
  Can someone please help me write the code Ram 8 3,600 Feb-08-2021, 08:21 AM
Last Post: Serafim
  Please help me to write code for this vij 8 3,984 Jun-10-2020, 12:13 PM
Last Post: pyzyx3qwerty
  Write pseudo code for a class assignment Scrimshot 3 3,571 May-07-2019, 05:38 PM
Last Post: Scrimshot
  Filter out all words that begin with P, B, or T. johneven 3 2,889 May-07-2019, 02:54 PM
Last Post: michalmonday
  Write a code to output in alphabetical order AbdelaliPython 1 4,748 Jan-19-2018, 09:03 PM
Last Post: j.crater

Forum Jump:

User Panel Messages

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