I'll be asleep when this room picks up participants again, so if anyone has any idea how to help with this one it would be really appreciated: stackoverflow.com/questions/17267682/…
I have changed my answer to better reflect your wishes:
from nltk import word_tokenize
with open('file_path') as f:
content = f.read()
# we will use your text example instead:
content = "A professional is a person who is engaged in a certain activity, or occupation, for gain or compensation...
In other news, stackoverflow.com/questions/17269648/… It's always beneficial to start a new language even if you quit after learning how to make strings
A common problem among beginners, is that they want to do X, and so to do X, they think they figure out they must do Y, so then they try to do Y, and Y does not work, so they come and ask help on how to do Y, where in fact, they should ask help for how to do X, and then they will get proper responses from those who know, the answer is usually Z, and not Y... and that is where most of the confusion comes from... So please.. tell us what your X is.
hello! Question: I have a list of integers: [65,66,67] for example, all less than 256. How do i cast that to a string? result: "ABC". The only thing I can think of is to use a for loop and convert each element to a char and concatenate. Is there a better way?
I'm attempting to transmit data over udp from python, and monitoring the interface via wireshark to see if anything is actually going out, but I'm not seeing much on wireshark
I recently received this rather amusing message while reviewing a user's first post:
Congratulations!
This was only a test, designed to make sure you were paying attention. This post
has already been removed, but thanks for taking time to leave feedback for the
author.
What is t...
I was reviewing Low Quality Answers and I failed an audit (I kind of think the audit was wrong, but this isn't what this is about. Then again, I may have just made a mistake).
I was a bit shocked to see that since that one failed audit, I can no longer review anything for two days. When clicking...
I feel as though I should be able to work with classes by now though, I mean Inbar, kevin, and a few others have tried explaining it to me. I read a tutorial on it(which is rare because I don't read tutorials), But when I write code I find it easier to work with functions. My code when using classes is all clustered and ugly, and half the time it doesn't run or work the way I want it to.
Bulls and Cows (also known as Cows and Bulls or Pigs and Bulls or Bulls and Cleots) is an old code-breaking paper and pencil game for two players, predating the similar commercially marketed board game Mastermind.
It is a game with numbers that may date back a century or more. It is played by two opponents. The game can also be played with 3 digits instead of 4.
On a sheet of paper, the players each write a 4-digit secret number. The digits must be all different. Then, in turn, the players try to guess their opponent's number who gives the number of matches. If the matching digits are on...
Peter convinced me to refactor the code I am working on to use classes(after I finish adding all the features to the program) and I'm almost scared to attempt it because I don't want to fail. =(
so if cows is being incremented then the indices arent equal and since your problem is that it increments cows instead of bulls, when you want it to increment bulls, somewhere in your code is causing the indices to not be set to equal
@IcyFlame that's my point, somewhere in your code it isn't acting as you want it to when you enter repeated digits, I couldn't tell you where without seeing your code
if you need the index for every element matched, you need to use list.index(number, start_position). see this post stackoverflow.com/questions/5419204/…
@GeorgeLonngren have you tried just playing experimenting with it and see if you can get it to work by luck?
@GeorgeLonngren I don't know enough to be able to help you =(
user2483250
Well I have, and the issue stems from which objects do I call during instantiation, or if I should be calling an integer? I have no idea what objects to call, after I completely guess on what class to instantiate.
oh.. yeah thats a problem then. Like I said I don't know enough to help you(still new to programming) but I'm sure someone will pop up that will be able to help you.
can someone explain to me why python 2.x imports Tkinter with a capital T and why 3.x uses lower case t, because other than this my code works in both python2.x and 3.x
Wow - is this going to end up that followers of the cabbage diverge into two factions, and continuously end up killing each other, as they can't decide on the one true way of the cabbage?
I'm not sure my conscience could deal with that...
Oh phew - as long as we agree - that's fine... thought we might have had to go to war if you thought its name was something like Jim or something else stupid...
def copy_to_clipboard(event):
"""Function for copying the correct output to the clipboard"""
# clears the clipboard of whatever was stored in it
root.clipboard_clear()
# appends the string to the clipboard
root.clipboard_append(event)
# ToDo: Function for toggling features
I want to be able to disable this function in the menubar
basically theres a drop down menu labeled "Options" and I want to add a feature that when you click on the menu there will be another label that says auto copy and if theres a check mark next to it it will run this function, otherwise it wont.
if that makes sense
I want the user to be able to chose whether or not the program copys results to the clipboard