import re from docx import Document def extract_emails_from_docx(file_path): doc = Document(file_path) text = "Kumar R M, Punith <[email protected]>; Sundara Murthy, Mohan <[email protected]>; Praju, Rajashekar <[email protected]>; Sheelavant, Santoshkumar <[email protected]>; Ramegowda, Madhu <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Surinder Saini <[email protected]>; 'Neeraj Malik Neeraj Malik' <[email protected]>; 'Vishnu Dutt Dixit' <[email protected]>; Pethagoundar RAJU CNN TIX <[email protected]>; Gajendran Sachidanantham CNN TOCI <[email protected]>; Harishankar venkatesh CNN TDPIT5 <[email protected]>; Pari Suresh CNN TIX <[email protected]>; Hiremath, Amruta <[email protected]>; Sujay Ahire <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Jai Gaur <[email protected]>; [email protected]; Gaurav Sharma <[email protected]>; Rajesh Nagori <[email protected]>; [email protected]; Khanjan Boruah <[email protected]>; [email protected]; [email protected]; Palani Velu Damodharan <[email protected]>; Udayamoorthy A <[email protected]>; Navin Joseph Peter J <[email protected]>; Sumeet Kharbanda <[email protected]>; Rajasekaran M <[email protected]>; Murosoli Selvam M <[email protected]>; Janakiraman P <[email protected]>; Soma Sundaram M <[email protected]>; Gokul I <[email protected]>; Fernandes Steevan S (NhP1/FCM) <[email protected]>; Maltesh Patil (NhP1/FCM) <[email protected]>; Dharmasthala Prajwal (NhP1/FCM <[email protected]>; Bhaswati Samal <[email protected]>; Sudipta Jana <[email protected]>; V.K. Baranwal <[email protected]>; [email protected]; [email protected]; [email protected]; saurabh pahuja <[email protected]>; Parveen Joshi <[email protected]>; Mohd Faizan <[email protected]>; Pankaj Jangra <[email protected]>; Lalan Singh <[email protected]>; [email protected]; [email protected]; 'TR DAS' <[email protected]>; 'Ankur Goel' <[email protected]>; [email protected]; [email protected]; [email protected]; 'Radhe Pandey' <[email protected]>; 'Sandeep thakural' <[email protected]>; 'JP Yadav' <[email protected]>; 'Avnish Gupta' <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Rajagopal V (OS & BE) <[email protected]>; ashokleyland.com <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Mistry Neville <[email protected]>; Rashmikant <[email protected]>; Kundu Srijita <[email protected]>; Hansdah Basudev <[email protected]>; Kumar Kundan <[email protected]>; [email protected]; [email protected]; [email protected]; Pophale A H <[email protected]>; Jadhav Avinash <[email protected]>; Kadam Abhiraj <[email protected]>; Giri Robin <[email protected]>; Das Dibyarup <[email protected]>; Gawade Ravindra <[email protected]>; Pophale A H <[email protected]>; Jadhav Avinash <[email protected]>; Sahu Ravi <[email protected]>; Gawali Vikas <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; Unique Transaction ID: eb826caa0935af0c51e2 <[email protected]>; Kale, Akshay <[email protected]>; Tulaskar, Nitin <[email protected]>; [email protected]; Aneetha Kanukolanu <[email protected]>; Srinivasa Rao <[email protected]>; Lavanya Potteti <[email protected]>; Sanjana Bhattacharya <[email protected]>; Arpit Agarwal <[email protected]>; Harish Kharthik . <[email protected]>; Advelli, Madan M <[email protected]>; [email protected]; [email protected]; Nair, Ranjith S <[email protected]>; Palagani, Mahesh <[email protected]>; Kasarla, Vijay Kumar <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Dipti Verma <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Sivasubramanian A (CQ – NPQ <[email protected]>; Ramakrishna Podapati (ALIMS <[email protected]>; Karunakaran P.S (CQ - New Product Quality <[email protected]>; Shafi UR Rahman (SUPPLIER QUALITY <[email protected]>; MohitKumar Ruhela (Sourcing and Supply Chain <[email protected]>; Kulasekar V.K (Sourcing and supply chain <[email protected]>; Lata Pandey (Sourcing &Supply chain <[email protected]>; Rajiv Kumar Singla (Sourcing & SC <[email protected]>; Vineet Kumar (Sourcing and Supply Chain <[email protected]>; Sivakumar TB (Operation Strategy & Business Excellence <[email protected]>; Sandeep Sondhi (Sourcing and Supply Chain <[email protected]>; Brahmananda Reddy Sathi (Sourcing and Supply Chain <[email protected]>; Sundarapandian M (New Product Quality -Trucks <[email protected]>; Sumy Saraf (S SC – Head - SM NM <[email protected]>; Nagarajan E (Head – Operation Strategy & Business Excellence <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Narendra Patwardhan <[email protected]>; Priyanka Pisal <[email protected]>; KAMINI TATKARE <[email protected]>; [email protected]; NITIN PATIL <[email protected]>; SADANAND SAPKAL <[email protected]>; AMIT SURVE <[email protected]>; [email protected]; Faridi, Ali Saif (THCM) <[email protected]>; Rajendra, Prasad Dobriyal (THCM <[email protected]>; Ranganath, Krishna Kamath (THCM <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Rishu Madan <[email protected]>; Jagdip Punia <[email protected]>; rajesh dhiman <[email protected]>; Srikanth Reddy <[email protected]>; Mukesh Singh <[email protected]>; saipraveen <[email protected]>; vinit chaudhary <[email protected]>; vikas siwach <[email protected]>; jaswinder singh <[email protected]>; Mohd Faizan <[email protected]>; Rishu Madan <[email protected]>; vinit chaudhary <[email protected]>; vikas siwach <[email protected]>; jaswinder singh <[email protected]>; gopal sharma <[email protected]>; NAVNATH SHELKE <[email protected]>; Neeraj Verma <[email protected]>; hunnysharma <[email protected]>; jitender thareja <[email protected]>; abhishekhsriwastaw <[email protected]>; basudevyadav <[email protected]>; Rahul Pant <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Improvement Cell (MCL-DCD/GN/IMP. CELL <[email protected]>; Jitendra Kr. Yadav (MCL-DCD/GN/IMP. CELL <[email protected]>; [email protected]; [email protected]; [email protected]; Rajeev Saxena <[email protected]>; Neeraj Gulati <[email protected]>; Kuldeep Kathpal <[email protected]>; Basudev Ganesh <[email protected]>; Jhashendra Yadav <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; Mohammad Arvi <[email protected]>; MEHERNOSH POONIWALA <[email protected]>; Priyanka Pisal <[email protected]>; ABHAY SATAM <[email protected]>; CHAITALI RAMBHAD <[email protected]>; Lakshmi Narayanan V <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Manoj Bharath Kota <[email protected]>; Nagendra Nukala <[email protected]>; Jainesh Shah <[email protected]>; Ahuja Dake <[email protected]>; Harish B <[email protected]>; Saurabh Pathak <[email protected]>; Arun Prakash V <[email protected]>; Renu Kumari Singh <[email protected]>; [email protected]; Umesh Madhyan <[email protected]>; Mohan Singh <[email protected]>; Somen Adhikari <[email protected]>; G Venkateswara Rao <[email protected]>; G Ganesh <[email protected]>; Anurag Sengar <[email protected]>; Dinesh Ratnam <[email protected]>; Apollo Bhattacharjee <[email protected]>; Srinivasa K R <[email protected]>; Ratnesh Pandey <[email protected]>; Manish Sawhney <[email protected]>; Nelagondarashi Naresh <[email protected]>; Satish N <[email protected]>; Aswinkumar S <[email protected]>; Raghavendra T N <[email protected]>; Narendrakumar Bhagvanbhai Patel <[email protected]>; Jagadeeshkumar Rangasamy <[email protected]>; Roopesh, A <[email protected]>; V Sivadas-SME - SC - Lifters <[email protected]>; Amlan Dasgupta-SME - SC - Krones Labeller <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Koul, Rajesh <[email protected]>; Sharma, Chirag <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Vishal Bansal <[email protected]>" for paragraph in doc.paragraphs: text += paragraph.text + "\n" email_pattern = r'\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Z|a-z]{2,}\b' emails = re.findall(email_pattern, text) return emails # Example usage: file_path = "your_word_file.docx" emails = extract_emails_from_docx(file_path) print("Extracted emails:") for email in emails: print(email)
Write, Run & Share Python code online using OneCompiler's Python online compiler for free. It's one of the robust, feature-rich online compilers for python language, supporting both the versions which are Python 3 and Python 2.7. Getting started with the OneCompiler's Python editor is easy and fast. The editor shows sample boilerplate code when you choose language as Python or Python2 and start coding.
OneCompiler's python online editor supports stdin and users can give inputs to programs using the STDIN textbox under the I/O tab. Following is a sample python program which takes name as input and print your name with hello.
import sys
name = sys.stdin.readline()
print("Hello "+ name)
Python is a very popular general-purpose programming language which was created by Guido van Rossum, and released in 1991. It is very popular for web development and you can build almost anything like mobile apps, web apps, tools, data analytics, machine learning etc. It is designed to be simple and easy like english language. It's is highly productive and efficient making it a very popular language.
When ever you want to perform a set of operations based on a condition IF-ELSE is used.
if conditional-expression
#code
elif conditional-expression
#code
else:
#code
Indentation is very important in Python, make sure the indentation is followed correctly
For loop is used to iterate over arrays(list, tuple, set, dictionary) or strings.
mylist=("Iphone","Pixel","Samsung")
for i in mylist:
print(i)
While is also used to iterate a set of statements based on a condition. Usually while is preferred when number of iterations are not known in advance.
while condition
#code
There are four types of collections in Python.
List is a collection which is ordered and can be changed. Lists are specified in square brackets.
mylist=["iPhone","Pixel","Samsung"]
print(mylist)
Tuple is a collection which is ordered and can not be changed. Tuples are specified in round brackets.
myTuple=("iPhone","Pixel","Samsung")
print(myTuple)
Below throws an error if you assign another value to tuple again.
myTuple=("iPhone","Pixel","Samsung")
print(myTuple)
myTuple[1]="onePlus"
print(myTuple)
Set is a collection which is unordered and unindexed. Sets are specified in curly brackets.
myset = {"iPhone","Pixel","Samsung"}
print(myset)
Dictionary is a collection of key value pairs which is unordered, can be changed, and indexed. They are written in curly brackets with key - value pairs.
mydict = {
"brand" :"iPhone",
"model": "iPhone 11"
}
print(mydict)
Following are the libraries supported by OneCompiler's Python compiler
Name | Description |
---|---|
NumPy | NumPy python library helps users to work on arrays with ease |
SciPy | SciPy is a scientific computation library which depends on NumPy for convenient and fast N-dimensional array manipulation |
SKLearn/Scikit-learn | Scikit-learn or Scikit-learn is the most useful library for machine learning in Python |
Pandas | Pandas is the most efficient Python library for data manipulation and analysis |
DOcplex | DOcplex is IBM Decision Optimization CPLEX Modeling for Python, is a library composed of Mathematical Programming Modeling and Constraint Programming Modeling |