workspace
stringclasses 1
value | channel
stringclasses 1
value | sentences
stringlengths 1
3.93k
| ts
stringlengths 26
26
| user
stringlengths 2
11
| sentence_id
stringlengths 44
53
| timestamp
float64 1.5B
1.56B
| __index_level_0__
int64 0
106k
|
---|---|---|---|---|---|---|---|
pythondev | help | I started working on some other people's code today (for the first time ever). One thing I see is that in one function they have added to `if` statements after eachother and no else block. My reflex is that the second `if` statement should be converted to `else` | 2019-04-10T07:15:39.022800 | Conchita | pythondev_help_Conchita_2019-04-10T07:15:39.022800 | 1,554,880,539.0228 | 17,821 |
pythondev | help | it depends what it does | 2019-04-10T07:16:39.024100 | Jimmy | pythondev_help_Jimmy_2019-04-10T07:16:39.024100 | 1,554,880,599.0241 | 17,822 |
pythondev | help | ```
def foo():
if x == 'poo':
# do this
if x == 'shoo':
# do this``` | 2019-04-10T07:16:48.024300 | Conchita | pythondev_help_Conchita_2019-04-10T07:16:48.024300 | 1,554,880,608.0243 | 17,823 |
pythondev | help | in this case it looks like it could be `if` & `elif` | 2019-04-10T07:17:15.024700 | Jimmy | pythondev_help_Jimmy_2019-04-10T07:17:15.024700 | 1,554,880,635.0247 | 17,824 |
pythondev | help | ```
if x % 2 == 0:
# stuff
if x % 3 == 0:
# stuff
``` | 2019-04-10T07:18:08.026200 | Jimmy | pythondev_help_Jimmy_2019-04-10T07:18:08.026200 | 1,554,880,688.0262 | 17,825 |
pythondev | help | in a case like that the behavior would change | 2019-04-10T07:18:18.026500 | Jimmy | pythondev_help_Jimmy_2019-04-10T07:18:18.026500 | 1,554,880,698.0265 | 17,826 |
pythondev | help | because if `x ` is 6 it would execute both `if` | 2019-04-10T07:18:32.026900 | Jimmy | pythondev_help_Jimmy_2019-04-10T07:18:32.026900 | 1,554,880,712.0269 | 17,827 |
pythondev | help | Aha. Well in this case it's one or the other. What happens in the first `if` statement will never execute the second `if` statement | 2019-04-10T07:20:03.028400 | Conchita | pythondev_help_Conchita_2019-04-10T07:20:03.028400 | 1,554,880,803.0284 | 17,828 |
pythondev | help | not really | 2019-04-10T07:20:55.029100 | Hiroko | pythondev_help_Hiroko_2019-04-10T07:20:55.029100 | 1,554,880,855.0291 | 17,829 |
pythondev | help | multiple `if` statements will execute if the conditions match | 2019-04-10T07:21:09.029800 | Hiroko | pythondev_help_Hiroko_2019-04-10T07:21:09.029800 | 1,554,880,869.0298 | 17,830 |
pythondev | help | `if` and `elif` will execute only one of the many you can put in sequence | 2019-04-10T07:21:35.030200 | Hiroko | pythondev_help_Hiroko_2019-04-10T07:21:35.030200 | 1,554,880,895.0302 | 17,831 |
pythondev | help | `else` will always execute if none of the others have | 2019-04-10T07:21:48.030800 | Hiroko | pythondev_help_Hiroko_2019-04-10T07:21:48.030800 | 1,554,880,908.0308 | 17,832 |
pythondev | help | is that what you’re curious about? | 2019-04-10T07:22:11.031400 | Hiroko | pythondev_help_Hiroko_2019-04-10T07:22:11.031400 | 1,554,880,931.0314 | 17,833 |
pythondev | help | I meant that with the specific code I'm working on now, the conditions will only match with one of the `if` blocks. | 2019-04-10T07:22:41.031800 | Conchita | pythondev_help_Conchita_2019-04-10T07:22:41.031800 | 1,554,880,961.0318 | 17,834 |
pythondev | help | ok, but can the params change to match the others? | 2019-04-10T07:23:51.033200 | Hiroko | pythondev_help_Hiroko_2019-04-10T07:23:51.033200 | 1,554,881,031.0332 | 17,835 |
pythondev | help | you said its a function, are there arguments for the function? | 2019-04-10T07:24:06.033800 | Hiroko | pythondev_help_Hiroko_2019-04-10T07:24:06.033800 | 1,554,881,046.0338 | 17,836 |
pythondev | help | Thanks <@Sasha>,good explanation | 2019-04-10T07:24:30.034200 | Scot | pythondev_help_Scot_2019-04-10T07:24:30.034200 | 1,554,881,070.0342 | 17,837 |
pythondev | help | It takes in a JSON request and the `if` condition is checking the source of the post request (not sure if I'm using the correct terms here) | 2019-04-10T07:25:59.035700 | Conchita | pythondev_help_Conchita_2019-04-10T07:25:59.035700 | 1,554,881,159.0357 | 17,838 |
pythondev | help | ie `if request['source']['Slack'] == True` or `if request['source']['Discord'] == True` | 2019-04-10T07:27:33.036800 | Conchita | pythondev_help_Conchita_2019-04-10T07:27:33.036800 | 1,554,881,253.0368 | 17,839 |
pythondev | help | ok. so that function is flexible | 2019-04-10T07:28:11.037100 | Hiroko | pythondev_help_Hiroko_2019-04-10T07:28:11.037100 | 1,554,881,291.0371 | 17,840 |
pythondev | help | you can pass in a json request from whatever sources it looks for and it’ll handle the thing with specific logic | 2019-04-10T07:28:36.037600 | Hiroko | pythondev_help_Hiroko_2019-04-10T07:28:36.037600 | 1,554,881,316.0376 | 17,841 |
pythondev | help | if its not being used now, it could have been in the past or is anticipated to be used in the future | 2019-04-10T07:28:55.038200 | Hiroko | pythondev_help_Hiroko_2019-04-10T07:28:55.038200 | 1,554,881,335.0382 | 17,842 |
pythondev | help | Gotcha, makes more sense now. Thanks for the help <@Jimmy> <@Hiroko> this is a :taco: One thing I'm learning in this process is that its much easier writing code than reading it lol | 2019-04-10T07:31:06.039200 | Conchita | pythondev_help_Conchita_2019-04-10T07:31:06.039200 | 1,554,881,466.0392 | 17,843 |
pythondev | help | yep | 2019-04-10T07:31:15.039400 | Hiroko | pythondev_help_Hiroko_2019-04-10T07:31:15.039400 | 1,554,881,475.0394 | 17,844 |
pythondev | help | but you might have had a similar experience if you look at your own code you wrote last year :slightly_smiling_face: | 2019-04-10T07:31:36.039900 | Hiroko | pythondev_help_Hiroko_2019-04-10T07:31:36.039900 | 1,554,881,496.0399 | 17,845 |
pythondev | help | since all the details for the “why” are long gone from short term memory | 2019-04-10T07:31:54.040600 | Hiroko | pythondev_help_Hiroko_2019-04-10T07:31:54.040600 | 1,554,881,514.0406 | 17,846 |
pythondev | help | lets just say I’ve had more than a few instances of “what idiot wrote this stuff?” … said idiot was me | 2019-04-10T07:32:21.041600 | Hiroko | pythondev_help_Hiroko_2019-04-10T07:32:21.041600 | 1,554,881,541.0416 | 17,847 |
pythondev | help | :smile: | 2019-04-10T07:32:25.041900 | Hiroko | pythondev_help_Hiroko_2019-04-10T07:32:25.041900 | 1,554,881,545.0419 | 17,848 |
pythondev | help | Exactly had this experience a few days ago when taking a look at the first script I made | 2019-04-10T07:32:29.042000 | Conchita | pythondev_help_Conchita_2019-04-10T07:32:29.042000 | 1,554,881,549.042 | 17,849 |
pythondev | help | hahaha | 2019-04-10T07:32:33.042200 | Conchita | pythondev_help_Conchita_2019-04-10T07:32:33.042200 | 1,554,881,553.0422 | 17,850 |
pythondev | help | thats why there’s such a focus on readability with code | 2019-04-10T07:32:59.042900 | Hiroko | pythondev_help_Hiroko_2019-04-10T07:32:59.042900 | 1,554,881,579.0429 | 17,851 |
pythondev | help | Well my goal is to make future me think present me is a complete imbecile | 2019-04-10T07:33:02.043100 | Conchita | pythondev_help_Conchita_2019-04-10T07:33:02.043100 | 1,554,881,582.0431 | 17,852 |
pythondev | help | a very admirable one! | 2019-04-10T07:33:12.043400 | Hiroko | pythondev_help_Hiroko_2019-04-10T07:33:12.043400 | 1,554,881,592.0434 | 17,853 |
pythondev | help | I'd start to worry when that's not the case :smile: | 2019-04-10T07:33:39.043800 | Jimmy | pythondev_help_Jimmy_2019-04-10T07:33:39.043800 | 1,554,881,619.0438 | 17,854 |
pythondev | help | yep | 2019-04-10T07:33:53.044000 | Hiroko | pythondev_help_Hiroko_2019-04-10T07:33:53.044000 | 1,554,881,633.044 | 17,855 |
pythondev | help | that’s when you start to fossilize and not keep growing in knowledge and competence | 2019-04-10T07:34:13.044800 | Hiroko | pythondev_help_Hiroko_2019-04-10T07:34:13.044800 | 1,554,881,653.0448 | 17,856 |
pythondev | help | thinking you know everythign and don’t need to learn because it was tried 5 years ago and didn’t work is the worst place to be | 2019-04-10T07:34:42.046000 | Hiroko | pythondev_help_Hiroko_2019-04-10T07:34:42.046000 | 1,554,881,682.046 | 17,857 |
pythondev | help | I have this rule that if I can't remember something that I'm embarrassed about from the previous month I need to change something. Meaning I'm too relaxed with xyz | 2019-04-10T07:34:54.046300 | Conchita | pythondev_help_Conchita_2019-04-10T07:34:54.046300 | 1,554,881,694.0463 | 17,858 |
pythondev | help | Ah one more thing | 2019-04-10T07:35:37.046500 | Conchita | pythondev_help_Conchita_2019-04-10T07:35:37.046500 | 1,554,881,737.0465 | 17,859 |
pythondev | help | Is `if condition` the same as `if condition == True` equal? | 2019-04-10T07:36:05.047300 | Conchita | pythondev_help_Conchita_2019-04-10T07:36:05.047300 | 1,554,881,765.0473 | 17,860 |
pythondev | help | no | 2019-04-10T07:36:47.047600 | Jimmy | pythondev_help_Jimmy_2019-04-10T07:36:47.047600 | 1,554,881,807.0476 | 17,861 |
pythondev | help | `if x` check that x is `thruthy` | 2019-04-10T07:37:46.048100 | Jimmy | pythondev_help_Jimmy_2019-04-10T07:37:46.048100 | 1,554,881,866.0481 | 17,862 |
pythondev | help | a non-empty string would enter it for example | 2019-04-10T07:38:03.048600 | Jimmy | pythondev_help_Jimmy_2019-04-10T07:38:03.048600 | 1,554,881,883.0486 | 17,863 |
pythondev | help | "truthy" lol | 2019-04-10T07:38:08.048800 | Conchita | pythondev_help_Conchita_2019-04-10T07:38:08.048800 | 1,554,881,888.0488 | 17,864 |
pythondev | help | yeah no idea how to say that :smile: | 2019-04-10T07:38:18.049000 | Jimmy | pythondev_help_Jimmy_2019-04-10T07:38:18.049000 | 1,554,881,898.049 | 17,865 |
pythondev | help | So it checks that "condition is not NaN" | 2019-04-10T07:38:48.049600 | Conchita | pythondev_help_Conchita_2019-04-10T07:38:48.049600 | 1,554,881,928.0496 | 17,866 |
pythondev | help | ? | 2019-04-10T07:38:52.049900 | Conchita | pythondev_help_Conchita_2019-04-10T07:38:52.049900 | 1,554,881,932.0499 | 17,867 |
pythondev | help | <https://stackoverflow.com/questions/39983695/what-is-truthy-and-falsy-in-python-how-is-it-different-from-true-and-false> this looks like a better explanation :slightly_smiling_face: | 2019-04-10T07:39:34.050400 | Jimmy | pythondev_help_Jimmy_2019-04-10T07:39:34.050400 | 1,554,881,974.0504 | 17,868 |
pythondev | help | Thank you! | 2019-04-10T07:40:23.051800 | Conchita | pythondev_help_Conchita_2019-04-10T07:40:23.051800 | 1,554,882,023.0518 | 17,869 |
pythondev | help | I never expected to study the terms of truthy and falsy but hey, life never ceases to surprise you | 2019-04-10T07:41:19.053800 | Conchita | pythondev_help_Conchita_2019-04-10T07:41:19.053800 | 1,554,882,079.0538 | 17,870 |
pythondev | help | ```
class Authors(db.Model)
name = db. Column(db.String(80), unique=True, primary_key=True)
book = db. Column(db.String(80), unique=True)
def __repr__(self) :
return "Name: {}>".format(self.name)
@app.route('/authors', methods=['GET'])
def get():
all_authors = Authors.query.all()
return jsonify({'authors': all_authors})
``` | 2019-04-10T07:44:39.057800 | Elmira | pythondev_help_Elmira_2019-04-10T07:44:39.057800 | 1,554,882,279.0578 | 17,871 |
pythondev | help | Error is : raise type Error (repr(o) is not Json serializable | 2019-04-10T07:46:22.059300 | Elmira | pythondev_help_Elmira_2019-04-10T07:46:22.059300 | 1,554,882,382.0593 | 17,872 |
pythondev | help | Any help please | 2019-04-10T07:46:30.059600 | Elmira | pythondev_help_Elmira_2019-04-10T07:46:30.059600 | 1,554,882,390.0596 | 17,873 |
pythondev | help | did you copy paste or write it? | 2019-04-10T07:49:14.060000 | Leida | pythondev_help_Leida_2019-04-10T07:49:14.060000 | 1,554,882,554.06 | 17,874 |
pythondev | help | `prinary_key` | 2019-04-10T07:50:04.060800 | Leida | pythondev_help_Leida_2019-04-10T07:50:04.060800 | 1,554,882,604.0608 | 17,875 |
pythondev | help | and does python2 take dotnotation like you have there `db. Column` | 2019-04-10T07:50:53.061400 | Leida | pythondev_help_Leida_2019-04-10T07:50:53.061400 | 1,554,882,653.0614 | 17,876 |
pythondev | help | You have to be careful with that, because you could get json like this.
```
{
"request": {
"source": {
"Slack": true,
"Discord": true
}
}
}
```
So you might have to handle both Discord and Slack sources. It doesn’t seem like it would realistically apply, but who knows. | 2019-04-10T07:51:19.061700 | Neta | pythondev_help_Neta_2019-04-10T07:51:19.061700 | 1,554,882,679.0617 | 17,877 |
pythondev | help | Yes. It doesn't? | 2019-04-10T07:51:29.062000 | Elmira | pythondev_help_Elmira_2019-04-10T07:51:29.062000 | 1,554,882,689.062 | 17,878 |
pythondev | help | repl seems to be happy :smile: | 2019-04-10T07:53:18.062500 | Leida | pythondev_help_Leida_2019-04-10T07:53:18.062500 | 1,554,882,798.0625 | 17,879 |
pythondev | help | ```
In [1]: class A:
...: a = 1
...:
In [2]: a = A()
In [3]: A. a
Out[3]: 1
``` | 2019-04-10T07:53:34.062900 | Neta | pythondev_help_Neta_2019-04-10T07:53:34.062900 | 1,554,882,814.0629 | 17,880 |
pythondev | help | Still a bad person for doing that. Don’t do that… | 2019-04-10T07:54:03.063600 | Neta | pythondev_help_Neta_2019-04-10T07:54:03.063600 | 1,554,882,843.0636 | 17,881 |
pythondev | help | Lool.... What? | 2019-04-10T07:55:08.064200 | Elmira | pythondev_help_Elmira_2019-04-10T07:55:08.064200 | 1,554,882,908.0642 | 17,882 |
pythondev | help | i did the same thing John below me did. So i could see the space wont produce an error. | 2019-04-10T07:55:39.064800 | Leida | pythondev_help_Leida_2019-04-10T07:55:39.064800 | 1,554,882,939.0648 | 17,883 |
pythondev | help | Can you help? Lool | 2019-04-10T07:56:41.065800 | Elmira | pythondev_help_Elmira_2019-04-10T07:56:41.065800 | 1,554,883,001.0658 | 17,884 |
pythondev | help | <@Elmira> so this *all_authors* right here, isn’t a JSON serializable object. You need to be able to turn that into something. It might be a cursor.
> all_authors = Authors.query.all()
You could try something like
> all_authors = [ author for author in Authors.query.all() ] | 2019-04-10T07:56:41.066000 | Neta | pythondev_help_Neta_2019-04-10T07:56:41.066000 | 1,554,883,001.066 | 17,885 |
pythondev | help | Oh okay.... I will try it | 2019-04-10T07:57:52.067100 | Elmira | pythondev_help_Elmira_2019-04-10T07:57:52.067100 | 1,554,883,072.0671 | 17,886 |
pythondev | help | is string serializable straight to json? | 2019-04-10T07:57:56.067200 | Leida | pythondev_help_Leida_2019-04-10T07:57:56.067200 | 1,554,883,076.0672 | 17,887 |
pythondev | help | Yes, a string on its own is valid json. | 2019-04-10T07:58:32.067800 | Neta | pythondev_help_Neta_2019-04-10T07:58:32.067800 | 1,554,883,112.0678 | 17,888 |
pythondev | help | All primitives are valid json. `"Some double quoted string"`, `0`, `null`, `[]`, `{}` all are valid on their own. | 2019-04-10T08:01:04.069900 | Neta | pythondev_help_Neta_2019-04-10T08:01:04.069900 | 1,554,883,264.0699 | 17,889 |
pythondev | help | Now error message is : Name: James is not Jason serializable | 2019-04-10T08:01:33.070700 | Elmira | pythondev_help_Elmira_2019-04-10T08:01:33.070700 | 1,554,883,293.0707 | 17,890 |
pythondev | help | Type error | 2019-04-10T08:02:17.071500 | Elmira | pythondev_help_Elmira_2019-04-10T08:02:17.071500 | 1,554,883,337.0715 | 17,891 |
pythondev | help | maybe it's James serializable :rolling_on_the_floor_laughing: :trollface: | 2019-04-10T08:02:39.072200 | Jimmy | pythondev_help_Jimmy_2019-04-10T08:02:39.072200 | 1,554,883,359.0722 | 17,892 |
pythondev | help | could you print the data to have a look :thinking_face: | 2019-04-10T08:03:19.072700 | Jimmy | pythondev_help_Jimmy_2019-04-10T08:03:19.072700 | 1,554,883,399.0727 | 17,893 |
pythondev | help | I entered data on the terminal as shown below | 2019-04-10T08:03:40.074000 | Elmira | pythondev_help_Elmira_2019-04-10T08:03:40.074000 | 1,554,883,420.074 | 17,894 |
pythondev | help | output it with `type( all_authors[0] )` or something, and maybe `dir( all_authors[0] )` or something. | 2019-04-10T08:04:20.075200 | Neta | pythondev_help_Neta_2019-04-10T08:04:20.075200 | 1,554,883,460.0752 | 17,895 |
pythondev | help | can anyone help me with a problem in git-submodules? | 2019-04-10T08:06:50.076300 | Henrietta | pythondev_help_Henrietta_2019-04-10T08:06:50.076300 | 1,554,883,610.0763 | 17,896 |
pythondev | help | I am trying to add a submodule to a project, but I need it to be cloned in the root | 2019-04-10T08:07:13.077000 | Henrietta | pythondev_help_Henrietta_2019-04-10T08:07:13.077000 | 1,554,883,633.077 | 17,897 |
pythondev | help | like `git submodule add <repo> ./` | 2019-04-10T08:07:33.077600 | Henrietta | pythondev_help_Henrietta_2019-04-10T08:07:33.077600 | 1,554,883,653.0776 | 17,898 |
pythondev | help | You can’t add it to the root, or the submodules .git will collide with the projects .git? | 2019-04-10T08:07:56.078400 | Neta | pythondev_help_Neta_2019-04-10T08:07:56.078400 | 1,554,883,676.0784 | 17,899 |
pythondev | help | oh | 2019-04-10T08:08:05.078600 | Henrietta | pythondev_help_Henrietta_2019-04-10T08:08:05.078600 | 1,554,883,685.0786 | 17,900 |
pythondev | help | is that the reason? | 2019-04-10T08:08:10.078800 | Henrietta | pythondev_help_Henrietta_2019-04-10T08:08:10.078800 | 1,554,883,690.0788 | 17,901 |
pythondev | help | damm | 2019-04-10T08:08:12.079000 | Henrietta | pythondev_help_Henrietta_2019-04-10T08:08:12.079000 | 1,554,883,692.079 | 17,902 |
pythondev | help | my idea will not work then | 2019-04-10T08:08:25.079500 | Henrietta | pythondev_help_Henrietta_2019-04-10T08:08:25.079500 | 1,554,883,705.0795 | 17,903 |
pythondev | help | <@Henrietta> What you could do is submod it into a subdirectory, and then symlink the files to root. | 2019-04-10T08:08:41.079900 | Neta | pythondev_help_Neta_2019-04-10T08:08:41.079900 | 1,554,883,721.0799 | 17,904 |
pythondev | help | hmm, not sure how PHP would like that | 2019-04-10T08:09:07.081000 | Henrietta | pythondev_help_Henrietta_2019-04-10T08:09:07.081000 | 1,554,883,747.081 | 17,905 |
pythondev | help | Not working... Seems I need to create a function to serialize output | 2019-04-10T08:09:30.081900 | Elmira | pythondev_help_Elmira_2019-04-10T08:09:30.081900 | 1,554,883,770.0819 | 17,906 |
pythondev | help | Thanks <@Neta> :taco: I'll try that | 2019-04-10T08:10:36.082700 | Henrietta | pythondev_help_Henrietta_2019-04-10T08:10:36.082700 | 1,554,883,836.0827 | 17,907 |
pythondev | help | <https://docs.python.org/3/library/json.html#json.JSONEncoder>
You might need to make a custom encoder for that data type. I don’t see how a name wouldn’t be encodable though. | 2019-04-10T08:11:26.083200 | Neta | pythondev_help_Neta_2019-04-10T08:11:26.083200 | 1,554,883,886.0832 | 17,908 |
pythondev | help | did anybody knows how to download datasources from tableau server and where to find project id and data sources id. i was going through tableau server client and couldn't able to figure it out. they have made documentation pretty tedious way and not so many great tutorial available in net. it will be really helpful if somebody knows the answer, i'm kind of stuck and pretty newbie to tableau server. | 2019-04-10T08:24:24.085800 | Rhona | pythondev_help_Rhona_2019-04-10T08:24:24.085800 | 1,554,884,664.0858 | 17,909 |
pythondev | help | Hello all, I'm using RotatingFileHandler with 2G rotation by size limit. Sometimes I end up with two files e.g. file.log and file.log.1 and my app keeps writing logs in both. Why this is happening ? | 2019-04-10T10:24:48.087600 | Marx | pythondev_help_Marx_2019-04-10T10:24:48.087600 | 1,554,891,888.0876 | 17,910 |
pythondev | help | hey guys,help plz,in tk button when m assigning this command error keeps coming,anyone solve this for me | 2019-04-10T10:49:51.087700 | Svetlana | pythondev_help_Svetlana_2019-04-10T10:49:51.087700 | 1,554,893,391.0877 | 17,911 |
pythondev | help | Why don't you try ORM? | 2019-04-10T12:02:57.088300 | Elmira | pythondev_help_Elmira_2019-04-10T12:02:57.088300 | 1,554,897,777.0883 | 17,912 |
pythondev | help | hello plz help me, i am getting an invaild syntax in my coding for elif statement for the follow | 2019-04-10T12:10:32.089200 | Elwanda | pythondev_help_Elwanda_2019-04-10T12:10:32.089200 | 1,554,898,232.0892 | 17,913 |
pythondev | help | elif (button1 ["text"] == "O" and button2 ["text"] == "O" and button3 ["text"] == "O" or
button4 ["text"] == "O" and button5 ["text"] == "O" and button6 ["text"] == "O" or
button7 ["text"] == "O" and button8 ["text"] == "O" and button9 ["text"] == "O" or
button3 ["text"] == "O" and button5 ["text"] == "O" and button7 ["text"] == "O" or
button1 ["text"] == "O" and button5 ["text"] == "O" and button9 ["text"] == "O" or
button1 ["text"] == "O" and button4 ["text"] == "O" and button7 ["text"] == "O" or
button2 ["text"] == "O" and button5 ["text"] == "O" and button8 ["text"] == "O" or
button3 ["text"] == "O" and button6 ["text"] == "O" and button9 ["text"] == "O" or
tkinter.messagebox.showinfo("Winner O", "You have just won a game") | 2019-04-10T12:10:34.089400 | Elwanda | pythondev_help_Elwanda_2019-04-10T12:10:34.089400 | 1,554,898,234.0894 | 17,914 |
pythondev | help | can you provide more context and format that with the :heavy_plus_sign: button on the left side of the text input | 2019-04-10T12:16:20.090200 | Claudine | pythondev_help_Claudine_2019-04-10T12:16:20.090200 | 1,554,898,580.0902 | 17,915 |
pythondev | help | makes it easier to read | 2019-04-10T12:16:23.090400 | Claudine | pythondev_help_Claudine_2019-04-10T12:16:23.090400 | 1,554,898,583.0904 | 17,916 |
pythondev | help | yeah k wait | 2019-04-10T12:17:05.090700 | Elwanda | pythondev_help_Elwanda_2019-04-10T12:17:05.090700 | 1,554,898,625.0907 | 17,917 |
pythondev | help | from tkinter import *
import tkinter.messagebox
tk = Tl()
tk.title("Tic Tac Toe")
click = True
def checker (buttons):
global click
if buttons ["text"] == " " and click == True:
buttons ["text"] = "x"
click = False
elif buttons ["text"] == " " and click == False:
buttons ["text"] = "O"
click = True
elif (button1 ["text"] == "X" and button2 ["text"] == "X" and button3 ["text"] == "X" or
button4 ["text"] == "X" and button5 ["text"] == "X" and button6 ["text"] == "X" or
button7 ["text"] == "X" and button8 ["text"] == "X" and button9 ["text"] == "X" or
button3 ["text"] == "X" and button5 ["text"] == "X" and button7 ["text"] == "X" or
button1 ["text"] == "X" and button5 ["text"] == "X" and button9 ["text"] == "X" or
button1 ["text"] == "X" and button4 ["text"] == "X" and button7 ["text"] == "X" or
button2 ["text"] == "X" and button5 ["text"] == "X" and button8 ["text"] == "X" or
button3 ["text"] == "X" and button6 ["text"] == "X" and button9 ["text"] == "X" or
tkinter.messagebox.showinfo("Winner X", "You have just won a game")
#123
#456
#789
elif (button1 ["text"] == "O" and button2 ["text"] == "O" and button3 ["text"] == "O" or
button4 ["text"] == "O" and button5 ["text"] == "O" and button6 ["text"] == "O" or
button7 ["text"] == "O" and button8 ["text"] == "O" and button9 ["text"] == "O" or
button3 ["text"] == "O" and button5 ["text"] == "O" and button7 ["text"] == "O" or
button1 ["text"] == "O" and button5 ["text"] == "O" and button9 ["text"] == "O" or
button1 ["text"] == "O" and button4 ["text"] == "O" and button7 ["text"] == "O" or
button2 ["text"] == "O" and button5 ["text"] == "O" and button8 ["text"] == "O" or
button3 ["text"] == "O" and button6 ["text"] == "O" and button9 ["text"] == "O" or
tkinter.messagebox.showinfo("Winner O", "You have just won a game") | 2019-04-10T12:17:29.091000 | Elwanda | pythondev_help_Elwanda_2019-04-10T12:17:29.091000 | 1,554,898,649.091 | 17,918 |
pythondev | help | oh god | 2019-04-10T12:17:39.091500 | Claudine | pythondev_help_Claudine_2019-04-10T12:17:39.091500 | 1,554,898,659.0915 | 17,919 |
pythondev | help | :joy::stuck_out_tongue_winking_eye: | 2019-04-10T12:17:48.091800 | Elwanda | pythondev_help_Elwanda_2019-04-10T12:17:48.091800 | 1,554,898,668.0918 | 17,920 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.