Learn Lambda Functions by Building an Expense Tracker- Step 13

Tell us what’s happening:

Technically I answered the question correctly and don’t have a problem, but I’m confused about the return value on the console. I think it’s wrong?

My code:
test = lambda x: x * 2
print(map(test, [2, 3, 5, 8]))

This returned <map object at 0xff59c8>, but shouldn’t it be 4, 6, 10, 16?


# User Editable Region

text = 'Hello World'
shift = 3
alphabet = 'abcdefghijklmnopqrstuvwxyz'
encrypted_text = ''

for char in text.lower():
    if char == ' ':
        encrypted_text += char
    index = alphabet.find(char)
    new_index = index + shift
    encrypted_text += alphabet[new_index] += char 
    print('char:', char, 'encrypted text:', encrypted_text)

# User Editable Region

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36

Challenge Information:

Learn String Manipulation by Building a Cipher - Step 43

This step will be fixed soon. The map() function returns a map object, and the string representation of a map object is exactly what you are seeing in the console.

To get a readable output, you should pass the results of map() to list(). Then, you’ll see what you expected to see.

please ask for help from the step you need help with, the cipher project doens’t use lambda functions, so why do you have the code for the cipher project here?