Skip to main content

Timeline for answer to Generate chord charts for ukulele by CCB60

Current License: CC BY-SA 3.0

Post Revisions

11 events
when toggle format what by license comment
May 31, 2017 at 13:18 history edited CCB60 CC BY-SA 3.0
Corrected sample output to reflect latest version of the code.
May 31, 2017 at 12:45 history edited CCB60 CC BY-SA 3.0
Corrected a coding error that snuck in; added try it online link
May 31, 2017 at 4:05 history edited CCB60 CC BY-SA 3.0
Accepted edits to code by Wheat Wizard.
May 31, 2017 at 3:57 comment added CCB60 Many thanks! Just found the site a few days ago, and have been enjoying it a lot. Lots to learn. It's clear I need to be more aggressive about the golfing. It goes against my training to obfuscate the code so! I'll adopt your changes into the post and then go ponder how you did it.
May 31, 2017 at 3:45 comment added Wheat Wizard Try it online!
May 31, 2017 at 3:45 comment added Wheat Wizard I don't want to bother you anymore so one last thing, but you use a bunch of list comprehensions in this code, which is a good idea. However you can save bytes by using generators instead in some situations. Built in functions like .join can use generators instead of lists meaning that you can get rid of the [...] inside the function. My next comment will include a link showing how this might be implemented in your case.
May 31, 2017 at 3:35 comment added Wheat Wizard Our site rules also allow you to use input() instead of raw_input() even though its not really good python practice. If you have any more questions about the site, or golfing python I'd be happy to answer them so just ping me in a comment or in chat!
May 31, 2017 at 3:33 comment added Wheat Wizard Here is a link with most of the extra whitespace trimmed away: Try it online!
May 31, 2017 at 3:33 comment added Wheat Wizard Hello and welcome to our site! This post looks good except for one thing, you should not prompt Chord? before input, its not in the specifications and thus is extra output. This is good because not prompting saves more bytes anyway. You also have a lot of whitespace you can trim off that is not required by python.
May 31, 2017 at 3:28 review First posts
May 31, 2017 at 3:37
May 31, 2017 at 3:24 history answered CCB60 CC BY-SA 3.0