Define a Python 3 function shuffle_language (A, B) that returns the shuffle A||B of languages A and B. Return the result
-
answerhappygod
- Site Admin
- Posts: 899604
- 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
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 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 |
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!