-
Practice>Python>Sets>Set Mutationshackerrank.com 2019. 2. 27. 13:21728x90
Set Mutations
Problem link : https://www.hackerrank.com/challenges/py-set-mutations/problem?utm_campaign=challenge-recommendation&utm_medium=email&utm_source=24-hour-campaign&h_r=next-challenge&h_v=zen&h_r=next-challenge&h_v=zen&h_r=next-challenge&h_v=zenDifficulty : EasyTip
- This problem is a bit difficult
- We can call a method with a name of it, please see getattr() for more detail
- getattr(s, c)(v) this is a key to resolve this problem
- c, *a = input().split(' ') c is fist item, *a is rest of all item
Solution
728x90'hackerrank.com' 카테고리의 다른 글
Practice>Python>Itertools>Iterables and Iterators (0) 2019.03.04 Practice>Python>Collections>Piling Up! (0) 2019.02.28 Practice>Python>Sets>Set .symmetric_difference() Operation (0) 2019.02.27 Practice>Python>Sets>Set .difference() Operation (0) 2019.02.27 Practice>Python>Sets>Set .intersection() Operation (0) 2019.02.27