ColeShepherd·9 เดือนที่ผ่านมา·discussSome potential alternatives to consider:1. classList = ['highlighted', 'primary'] .concatif(discount, 'on-sale') .join(' ') 2. classList = ' '.join(['highlighted', 'primary'] + (['on-sale'] if discount else [])) 3. mut classList = ['highlighted', 'primary'] if discount: classList.append('on-sale') classList = ' '.join(classList) freeze classList 4. def get_class_list(discount): mut classList = ['highlighted', 'primary'] if discount: classList.append('on-sale') classList = ' '.join(classList) return classList classList = get_class_list(discount)
ColeShepherd·12 เดือนที่ผ่านมา·discuss> present knowledge as a tree that you can expand to get deeperI'm very interested in this. I've considered building this, but if this already exists, someone let me know please!
ColeShepherd·ปีที่แล้ว·discussI would love an app with a configurable "unlock" task. Ex:- Do a quick mindfulness/breathing exercise.- Answer a quick quiz question related to something you're learning.- Remind you of pending to-dosAnyone know of an app like this?
1.
2.
3.
4.