Filter in python3


I am doing the same, practicing with Python 3 in an attempt to save some of my code findings. I did find the the list() function to convert the object to a list, but could not join it as Python 2 presents the message. Specifically, my output is:
[‘I’, ’ ', ‘a’, ‘m’, ’ ', ‘a’, ‘n’, ‘o’, ‘t’, ‘h’, ‘e’, ‘r’, ’ ', ‘s’, ‘e’, ‘c’, ‘r’, ‘e’, ‘t’, ’ ', ‘m’, ‘e’, ‘s’, ‘s’, ‘a’, ‘g’, ‘e’, ‘!’]

I don’t understand your code in the following line:


nor was my attempt recognized:

message = join(message)

I am using Python 3.70b3
Any help would be appreciated.

Filter function with Lambda and List in Python 3.X

in python3, after you convert to list, you should be able to use .join()

the string before .join() is what is used to join the list together, for example:


gives 1-2-3, see how the hyphen plays it part?

join joins the list into a string, which means you need to convert to list first. This differs from python2, because in python2 range() returns a list


Thanks. Got it! (add characters)


. join() method use
for example