Question: 
Write a function to remove all characters except letters and numbers using regex


Model's Code:
import re

def remove_char(s):
    return re.sub(r'[^a-zA-Z0-9]', '', s)



Sample Correct Code:
import re 
def remove_char(S):
  result = re.sub('[\W_]+', '', S) 
  return result


Asserts:
assert remove_char("123abcjw:, .@! eiw") == '123abcjweiw'
assert remove_char("Hello1234:, ! Howare33u") == 'Hello1234Howare33u'
assert remove_char("Cool543Triks@:, Make@987Trips") == 'Cool543TriksMake987Trips' 


Tests:
Test 1 of 3: PASS
Test 2 of 3: PASS
Test 3 of 3: PASS

Test 727 of 974: 549/727 (75.51581843191197%): success