I think I've got the answer:
check = 'I' in finallist1
User Profile
Collapse
-
list search
Hi I want the program to search a list for a word and notifiy me if the word exist in the list or no. How can I do it?
if i use fallowing code:
finallist1.inde x('high')
it only returns an index number when word exist in the list and it generates an error if the word is not in the list.
I want the program to just tell me if the word is or isn't in the list.
Thanks!... -
thanks a lot for your help.
Ps I have posted this topic on various forums while looking for an answer. Sorry for that.Leave a comment:
-
-
efficient algorithm
Hey I'm looking for a solution to the below question. Any recommendations on how to write this algorithm???
Thanks:
You are given a sequence s of numbers, in increasing order, for example:
s = 2, 5, 7, 9, 13, 15.
You are also given a number n, say n = 16. You have to try to find two numbers x and y from s, such that x+y = n, if such numbers exist....Leave a comment:
-
efficient algorithm [Merged]
Hey I'm looking for a solution to the below question. Any recommendations on how to write this algorithm???
Thanks:
You are given a sequence s of numbers, in increasing order, for example:
s = 2, 5, 7, 9, 13, 15.
You are also given a number n, say n = 16. You have to try to find two numbers x and y from s, such that x+y = n, if such numbers exist. In this example, you could take... -
efficient algorithm
Hey I'm looking for a solution to the belowe question. Any recommendations on how to write this algorithm???
Thanks:
You are given a sequence s of numbers, in increasing order, for example:
s = 2, 5, 7, 9, 13, 15.
You are also given a number n, say n = 16. You have to try to find two numbers x and y from s, such that x+y = n, if such numbers exist. In this example, you could take... -
efficient algorithm
Hey I'm looking for a solution to the belowe question. Any recommendations on how to write this algorithm???
Thanks:
You are given a sequence s of numbers, in increasing order, for example:
s = 2, 5, 7, 9, 13, 15.
You are also given a number n, say n = 16. You have to try to find two numbers x and y from s, such that x+y = n, if such numbers exist. In this example, you could take... -
Grammar correction
Hi,
Hi I have a question concedrning grammar correction. What steps do you think are included in GC process? That’s what I have so far:
1. Find each sentence in a text
2. Look up words in the Dictionary (lexicon)
3. POS tagging
4. Parsing
Bartosz -
thanks, so easy and it works. I was playing with list, remove, etc. and couldn't get anywhere.Leave a comment:
-
string manipulation
hi,
I want to remove all the words in a string after certain point i.e. I'm looking for word "-----Original" and then I want to remove everything that fallows. How can I do this? Should I use list or maybe there are string functions that I can use? -
-
how to search string for words??
Hi I want to search a text file (.txt) for words that I specify in my program. However, I can’t come up with any working solution. My program search string in a text file for ‘met|meeting|me ets’ but it returns values from words like “metro”: met-ro. I want it to look only for words ‘met, meeting, etc.’ and I don’t want them to be a part of other words. This is what I have right now:
pattern = re.compile('(?i )met|meeting')...
No activity results to display
Show More
Leave a comment: