What do you want to save?
Add Code snippet
New code examples
-
TypeScript 2021-11-22 02:55:18
how to extract comments from word python
#!/usr/bin/env python # Given a .docx file, extract a CSV list of all tagged (commented) text # This is version 6.0 of the script # Date: 12 February 2020 import zipfile import csv from bs4 import BeautifulSoup as Soup import tkinter as tk from tkinter ... Add solution -
Python 2021-11-19 16:26:11
python .findall
import re # The string you want to find a pattern within test_string = 'Hello greppers!' # Creating a regular expression pattern # This is a simple one which finds "Hello" pattern = re.compile(r'Hello') # This locates and returns all the occu... Add solution -
Python 2021-11-13 15:57:16
Numpy nditer
import numpy as np a=np.array([[2,4,5],[3,6,7],[4,8,9]]) print("Original array is :") print(a) print("Modified array is:") for x in np.nditer(a, flags = ['external_loop'],order='F'): prin... Add solution -
Python 2021-10-03 10:01:03
how to find the indexes of a substring in a string in python
import re # matches_position_start will be a list of starting index positions matches_start = re.finditer(word.lower(), string.lower()) matches_position_start = [match.start() for match in matches_start] # matches_position_end will be a list of ending in... Add solution -
Python 2021-09-29 15:16:02
regex in python
import re # The string you want to find a pattern within test_string = 'Hello greppers!' # Creating a regular expression pattern # This is a simple one which finds "Hello" pattern = re.compile(r'Hello') # This locates and returns all the occu... Add solution -
Python 2021-09-06 19:01:04
start and end index in python
import re # matches_position_start will be a list of starting index positions matches_start = re.finditer(word.lower(), string.lower()) matches_position_start = [match.start() for match in matches_start] # matches_position_end will be a list of ending in... Add solution
Best helpers
Ranking is empty