Specs: Python 3.3.2
What I was trying to do:
Create a simple name and employee number dictionary application. Have the user enter a list of names and employee numbers. Your interface should allow a sorted output (sorted by name) that displays employee names followed by their employee numbers.
What I came up with:
# enter a list of names of employees
# enter a list of employee numbers
# zip them together
def hrcat():
name = input('Please enter names of employees: ')
number = input('Please enter employee numbers: ')
output = zip(name,number)
print(output)
Question:
When given two lists of names and numbers, it returns the memory address of an object; something looks like this:
>>> hrcat()
Please enter names of employees: a,b,c
Please enter employee numbers: 1,2,3
<zip object at 0x7fea10ce4b90>
I wonder why it returns the memory address instead of the actual content of that object? I googled online but wasn't able to find answers addressing this question. Thank you for your insights!