Define a Python 3 function shuffle_language (A, B) that returns the shuffle A||B of languages A and B. Return the result
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
Define a Python 3 function shuffle_language (A, B) that returns the shuffle A||B of languages A and B. Return the result
question, you will need to include it as part of your answer to this question. For example: Test Result print(sorted (shuffle_language({'ab'}, {'cd', 'e'}))) ['abcd', 'abe', 'acbd', 'acdb', 'aeb', 'cabd', 'cadb', 'cdab', 'eab'] print(sorted (shuffle_language({}, {'aa', 'ab', 'bb'}}) [] Answer: (penalty regime: 10, 20, ... %) 1 |
Define a Python 3 function shuffle_language (A, B) that returns the shuffle A||B of languages A and B. Return the result as a set of strings, that is, without duplicates. If you want to use your function from the previous