On 4 August 2015 at 23:09, Quiles, Stephanie
wrote:
> I am still struggling with this one.
Hi Stephanie, Alan has already raised a few issues with your code so
I'm just going to address the one that's showing in your error
message.
These two lines are generating the error message:
> infile
On 04/08/15 23:09, Quiles, Stephanie wrote:
def main():
found = False
search = input("Enter a name in the file for info: ")
infile = open("emails.dat", "r")
name = infile.readline()
while name != '':
email1, email2, phone, phone2 = (infile.readline())
I am still struggling with this one.
Here is my code to retrieve data from emails.dat file
def main():
found = False
search = input("Enter a name in the file for info: ")
infile = open("emails.dat", "r")
name = infile.readline()
while name != '':
email1, email2, p
I'm trying to tell it to print everything under that particular name. I would
have to def info, correct? But set it equal to what to make it work?
Stephanie Quiles
Sent from my iPhone
> On Aug 3, 2015, at 3:12 AM, Alan Gauld wrote:
>
>> On 03/08/15 04:04, Quiles, Stephanie wrote:
>>
>> def m
On 03/08/15 04:04, Quiles, Stephanie wrote:
def main():
...
name_search = input("Enter a name in the file for info: ")
for name in emails:
if name[0] == name_search:
print("This is the info: ", info)
What is info? Is it supposed to be name? or name[1:]?
Its n
how do i go about being able to add a feature to search for individual entries
that have been saved into that dictionary or else tell me that the name I
entered is not found?
Here is the code that i have so far…
import pickle
def main():
infile = open("emails.dat", "rb")
emails = pick