Timeline for Help Stack Exchange transpose tables
Current License: CC BY-SA 4.0
17 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jan 6, 2021 at 9:39 | comment | added | Anakhand |
Thanks for the suggestions, @ovs! I realized now that removing the del n[1] actually increased the byte count; I think what happened is that you used an old revision that didn't have the extra [0] in map(f,range(1,len(n[0][0])) (added to fix a bug), so when you came back to compare, the new revision looked like it had one more byte. But the open(0) definitely helped a lot, I'm going to write that trick down! :)
|
|
| Jan 6, 2021 at 9:33 | history | edited | Anakhand | CC BY-SA 4.0 |
deleted 79 characters in body
|
| Jan 5, 2021 at 21:35 | history | edited | Anakhand | CC BY-SA 4.0 |
added 92 characters in body
|
| Jan 5, 2021 at 15:49 | comment | added | ovs |
And one more byte can be saved by by doing the del n[1] by hand using iterable unpacking: Try it online!
|
|
| Jan 5, 2021 at 15:43 | comment | added | ovs |
You can replace all of sys.stdin.readlines() with open(0), which doesn't even need an import.
|
|
| Jan 5, 2021 at 14:03 | history | edited | Anakhand | CC BY-SA 4.0 |
Fixed a bug introduced while optimising
|
| Jan 5, 2021 at 12:53 | history | edited | Anakhand | CC BY-SA 4.0 |
deleted 23 characters in body
|
| Jan 5, 2021 at 12:45 | history | edited | Anakhand | CC BY-SA 4.0 |
added 43 characters in body
|
| Jan 5, 2021 at 12:32 | history | edited | Anakhand | CC BY-SA 4.0 |
deleted 715 characters in body
|
| Jan 5, 2021 at 12:19 | history | edited | Anakhand | CC BY-SA 4.0 |
deleted 286 characters in body
|
| Jan 5, 2021 at 12:13 | comment | added | Anakhand |
@cairdcoinheringaahing Thanks for the TIO! Ah I see, I think it's that this program assumes a trailing newline at the last line (that's why I discard the last "split" value with [:-1]). I've added an extended TIO with all the sample input cases, it looks fine I think.
|
|
| Jan 5, 2021 at 12:12 | history | edited | Anakhand | CC BY-SA 4.0 |
Updated TIO
|
| Jan 5, 2021 at 12:09 | comment | added | caird coinheringaahing♦ | Also, be sure to check out our Tips for golfing in Python page | |
| Jan 5, 2021 at 12:09 | comment | added | caird coinheringaahing♦ | Welcome to the site, and nice first answer! I've edited in a link to TIO for you, and it looks like this doesn't fully work (see the TIO link)? I'd also recommend for basic golfing to remove all whitespace (i.e. spaces) where possible: Try it online! | |
| Jan 5, 2021 at 12:06 | history | edited | caird coinheringaahing♦ | CC BY-SA 4.0 |
added 388 characters in body
|
| Jan 5, 2021 at 12:00 | review | First posts | |||
| Jan 5, 2021 at 12:09 | |||||
| Jan 5, 2021 at 11:53 | history | answered | Anakhand | CC BY-SA 4.0 |