2021-12-11から1日間の記事一覧
import re check = re.match('a...e', 'apple') if check: print('Matched') else: print('Did not match') Output Matched
str1 = 'Hello Java!' rep = str1.replace('Java', 'Python') print(rep) Output Hello Python!
import re check = re.match('a...e', 'apple') if check: print('Matched') else: print('Did not match') Output Matched
str1 = 'Hello Java!' rep = str1.replace('Java', 'Python') print(rep) Output Hello Python!