# generate_metal_subgenre.py import random BEGINNING = [ 'Speed' , 'Alternative' , 'Extreme' , ] MIDDLE = [ # Let's start with a bunch of words that sound evil and dark and hardcore. 'Grind' , 'Doom' , 'Drone' , 'Thrash' , 'Funeral' , 'Black' , 'Death' , 'Crust' , 'Corpse' , 'Grunge' , 'Industrial' , 'Power' , 'Dragon' , 'Gothic' , 'Vampire' , # And there's always the weird fusions with other genres. 'Funk' , 'Folk' , 'Polka' , 'Nu' , 'Power' , 'Stoner' , 'Rap' , 'Kawaii' , # The Detroit rule also works on metal. 'Swedish' , 'Norwegian' , 'Japanese' , 'German' , 'Ethno-Prussian' , # And now some pretentious words so we sound sophisticated. 'Symphonic' , 'Orchestral' , 'Classical' , 'Math' , 'Avant-Garde' , 'Experimental' , 'Melodic' , 'Neoclassical' , ] END = [ 'core' , 'gaze' , ' Metal' , ] def generate_metal_subgenre ( ) : num_words = random . randint ( 1 , 4 ) subgenre = random . choice ( BEGINNING + MIDDLE ) if num_words > 1 : for _ in range ( num_words - 1 ) : subgenre + = ' ' + random . choice ( MIDDLE ) subgenre + = random . choice ( END ) return subgenre for _ in range ( 40 ) : print ( generate_metal_subgenre ( ) )

IyBnZW5lcmF0ZV9tZXRhbF9zdWJnZW5yZS5weQppbXBvcnQgcmFuZG9tCgpCRUdJTk5JTkcgPSBbCiAgICAnU3BlZWQnLAogICAgJ0FsdGVybmF0aXZlJywKICAgICdFeHRyZW1lJywKXQoKTUlERExFID0gWwogICAgIyBMZXQncyBzdGFydCB3aXRoIGEgYnVuY2ggb2Ygd29yZHMgdGhhdCBzb3VuZCBldmlsIGFuZCBkYXJrIGFuZCBoYXJkY29yZS4KICAgICdHcmluZCcsICdEb29tJywgJ0Ryb25lJywgJ1RocmFzaCcsICdGdW5lcmFsJywgJ0JsYWNrJywgJ0RlYXRoJywgJ0NydXN0JywKICAgICdDb3Jwc2UnLCAnR3J1bmdlJywgJ0luZHVzdHJpYWwnLCAnUG93ZXInLCAnRHJhZ29uJywgJ0dvdG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