Timeline for answer to Code-Golf: Count Islands by Solvation
Current License: CC BY-SA 3.0
Post Revisions
9 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Aug 9, 2017 at 14:33 | comment | added | Solvation | Thank you both for the help! Python's leniency keeps surprising me : ) | |
| Aug 9, 2017 at 14:31 | history | edited | Solvation | CC BY-SA 3.0 |
Added content from helpful comments
|
| Aug 9, 2017 at 2:14 | comment | added | Arnold Palmer | 203 bytes combining @StepHen's and my suggestions, plus changing the conditionals a bit. | |
| Aug 9, 2017 at 2:07 | comment | added | Arnold Palmer |
You have more whitespace than needed. Remove the spaces between (s.index(l),i) and for, enumerate(l) and if, -v[0])<2 and and, p=0: and p, and bool(x&n[p]) and else. You also have more parenthesis than needed in your print statement, since you have 2 groups surrounding set. Edit: Beat by StepHen cause doing stuff on mobile isn't ideal.
|
|
| Aug 9, 2017 at 2:05 | review | Late answers | |||
| Aug 9, 2017 at 3:23 | |||||
| Aug 9, 2017 at 2:04 | comment | added | Stephen | Welcome to PPCG! Here's 217 bytes by removing some spaces. The Python parser is really lenient :P | |
| Aug 9, 2017 at 2:00 | history | edited | Solvation | CC BY-SA 3.0 |
Added a place to try the code
|
| Aug 9, 2017 at 1:53 | review | First posts | |||
| Aug 9, 2017 at 2:04 | |||||
| Aug 9, 2017 at 1:50 | history | answered | Solvation | CC BY-SA 3.0 |