Python - Conditional Prefix in List
Given a list of elements, attach different prefix according to condition. Input : test_list = [45, 53, 76, 86, 3, 49], pref_1 = "LOSE-", pref_2 = "WIN-" Output : ['LOSE-45', 'WIN-53', 'WIN-76', 'WIN-86', 'LOSE-3', 'LOSE-49'] Explanation : All 50+ are prefixed as "WIN-" and others as "LOSE-". Input :