Python lambda function printing <function <lambda> at 0x7fcbbc740668> instead of value
I am a beginner in python, and I was playing around with lambda functions. I was writing a program using lambda function to print characters that are +1 the ascii value of the input characters. My code is #!/usr/bin/python import sys try: word = sys.argv[1] except: print "No arguments passed" sys.exit(1) def convert_ascii(char): return "".join(chr(ord(char) + 1)) for i in word: print convert_ascii(i) print lambda x: chr(ord(i) + 1) I have a function convert_ascii that does the same thing as lambda. However, my output is /usr/bin/python2.7 /home/user1/PycharmProjects/test/Tut1/asciipl2.py "abc