Timeline for Inverting string-based binary number in one line in Python
Current License: CC BY-SA 4.0
33 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Oct 9, 2022 at 12:53 | comment | added | Jonathan Allan | @Noodle9 - updated. | |
| Oct 9, 2022 at 12:52 | history | edited | Jonathan Allan | CC BY-SA 4.0 | deleted 3 characters in body |
| Oct 9, 2022 at 10:42 | comment | added | Noodle9 | Aside: stdin , stdout, and stderr are each just single words, there're no internal spaces. | |
| Oct 9, 2022 at 2:36 | comment | added | Jonathan Allan | Nice one @dingledooper :) | |
| Oct 9, 2022 at 2:34 | history | edited | Jonathan Allan | CC BY-SA 4.0 | added 357 characters in body |
| Oct 9, 2022 at 2:22 | comment | added | dingledooper | 41 bytes: 0in map(str.find,*open(0))or print('yep'). | |
| Oct 9, 2022 at 1:14 | history | edited | Jonathan Allan | CC BY-SA 4.0 | added 39 characters in body |
| Oct 9, 2022 at 1:06 | history | edited | Jonathan Allan | CC BY-SA 4.0 | added 79 characters in body |
| Oct 9, 2022 at 1:01 | history | edited | Jonathan Allan | CC BY-SA 4.0 | added 79 characters in body |
| Oct 9, 2022 at 0:55 | comment | added | Jonathan Allan | @loopywalt I thought of that, but don't think it's really in keeping with the intention. | |
| Oct 9, 2022 at 0:55 | comment | added | xnor | Looks like the any(...) can be 1in .. | |
| Oct 9, 2022 at 0:46 | comment | added | loopy walt | print(all(map(str.__ne__,*open(0)))*'yep') saves another 2 but prints an empty line in case of failure. | |
| Oct 9, 2022 at 0:42 | comment | added | Jonathan Allan | Let us continue this discussion in chat. | |
| Oct 9, 2022 at 0:41 | comment | added | naffetS | that's exactly what I said lol. edit: wait, you mean literally typing a backslash and n? | |
| Oct 9, 2022 at 0:39 | comment | added | Jonathan Allan | @Steffan nope, that does not work, but typing \n at the end of the second line does (facepalm). EDIT or indeed an x :/ | |
| Oct 9, 2022 at 0:38 | comment | added | naffetS | Yes, it seems to only work if you finish the previous input. So <enter> Ctrl+Z <enter>. (relevent: stackoverflow.com/a/16136924/10914124) | |
| Oct 9, 2022 at 0:36 | comment | added | Jonathan Allan | @Steffan Tried that but it produced no output for me, while the double use with no newline worked. | |
| Oct 9, 2022 at 0:32 | comment | added | naffetS | Ctrl+Z <enter> works fine on Windows. You just need to make sure you suffix the previous input with a newline, or the Ctrl+Z is included as part of that input. | |
| Oct 9, 2022 at 0:32 | history | edited | Jonathan Allan | CC BY-SA 4.0 | added 132 characters in body |
| Oct 9, 2022 at 0:30 | comment | added | naffetS | On Linux, Ctrl+D seems to work. | |
| Oct 9, 2022 at 0:29 | comment | added | Jonathan Allan | Windows seems to need CtrlZ <return> CtrlZ <return> - :/ :o | |
| Oct 9, 2022 at 0:27 | history | edited | Jonathan Allan | CC BY-SA 4.0 | deleted 2 characters in body |
| Oct 9, 2022 at 0:20 | history | edited | Jonathan Allan | CC BY-SA 4.0 | deleted 2 characters in body |
| Oct 9, 2022 at 0:16 | comment | added | loopy walt | Good question, actually. Perhaps CTRL-D? (Just a wild guess.) | |
| Oct 9, 2022 at 0:14 | history | edited | Jonathan Allan | CC BY-SA 4.0 | added 76 characters in body |
| Oct 9, 2022 at 0:11 | comment | added | Jonathan Allan | @loopywalt Oh yeah, I always wondered - how does that know when to stop taking input? Is it EOF? | |
| Oct 9, 2022 at 0:08 | comment | added | loopy walt | any(map(str.__eq__,*open(0)))or print('yep') | |
| Oct 9, 2022 at 0:02 | history | edited | Jonathan Allan | CC BY-SA 4.0 | added 146 characters in body |
| Oct 8, 2022 at 23:55 | comment | added | Jonathan Allan | @Neil thanks, I got there in the end :p (many edits) | |
| Oct 8, 2022 at 23:54 | history | edited | Jonathan Allan | CC BY-SA 4.0 | added 10 characters in body |
| Oct 8, 2022 at 23:52 | comment | added | Neil | Don't you mean unless any of the pairs are equal to each other? | |
| Oct 8, 2022 at 23:49 | history | edited | Jonathan Allan | CC BY-SA 4.0 | added 203 characters in body |
| Oct 8, 2022 at 23:43 | history | answered | Jonathan Allan | CC BY-SA 4.0 |