diff options
| author | Gustav Sörnäs <gusso230@student.liu.se> | 2020-02-05 15:25:25 +0100 |
|---|---|---|
| committer | Gustav Sörnäs <gusso230@student.liu.se> | 2020-02-05 15:25:25 +0100 |
| commit | bf125b50ddbd7550c757c716d736bc65ea1f0a25 (patch) | |
| tree | 3112506ad7531e47506ff13b3488795155570f8b | |
| parent | 6f3d4f70c8a57bf0bc01d510e3d27753fe0bfc5b (diff) | |
| download | tdde44-bf125b50ddbd7550c757c716d736bc65ea1f0a25.tar.gz | |
Fix uppgifter after split
| -rw-r--r-- | upg1_3.py | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -1,3 +1,5 @@ +import random + def concatenate_strings(string1, string2): return string1 + string2 @@ -6,7 +8,7 @@ def use_the_linebreak(): return "rad 1\nrad 2" def generate_pokemon_name(prefixes, suffixes): - return concatenate_strings(select_random(prefixes), select_random(suffixes)) + return concatenate_strings(random.choice(prefixes), random.choice(suffixes)) def first_word(s): return s.split(" ")[0] |
