@MichaelFaulkner/

Customer Service Bot

Python

Detects a question so that it can be easily answered

fork
loading
Files
  • main.py
  • email.txt
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
print('Customer Service Bot: Version 1.0')
"""

The goal of this bot is to detect a question within an email, and save the answer to that question so you don't have to answer that question again.

"""
# begins question identification
thing = 1
new_Q = ""
check = ''
f=open("email.txt", "r")
question = []
contents =f.read()
qmark = contents.find('?')
question.append(contents[qmark])
while str(check) != '.':
  check = contents[qmark - thing]
  question.append(check)
  thing = thing + 1
question.reverse()
for letter in question:
  new_Q = new_Q + letter
print("This is the question that was found: " + new_Q[1:])