# Posts

• ## Print map while using lambda in Python 3

• Since lambda x: print(x) is a syntax error in Python < 3, I’m assuming Python 3. That means map returns a generator, meaning to get map to actually call the function on every element of a list, you need to iterate through the resultant generator. Fortunately, this can be done easily: list(map(lambda x:print(x),primes)) Oh, and you can get rid of the lambda too, if you like: list(map(print,primes)) But, at that point you are better off with letting print handle it: print(*primes, sep='\n') NOTE: I said earlier that '\n'.join would be a good idea. That is only true for a list...

• ## The Only Way to Cope with the Future

• The only way to cope with the future is to leave nothing to be desired for the moment. As we cannot change the past and predict the future, we should cherish the present. Good fortune and misfortune in life are formed in every action now. To grasp the moment, is to grasp the secret of happiness. Just get rid of the past and future of perseverance, and make a comfortable living at the present. It’s the true meaning of life what you have actually acquired. No matter what you face today, you have to believe yourself and be stronger than...
• ## Start to Design Web Front-End

• I start to design web front-end of my blog site. Bootstrap makes front-end web development faster and easier. It’s made for folks of all skill levels, devices of all shapes, and projects of all sizes.