I have made a programming language and added print statement in it but neither print prints anything nor it displays anything. here is the code
def p_print_statement(t): 'statement : PRINT expression' t[0] = ([t[2]],[t[1]]) print(t[0])
Please help me to solve this problem.
def defines a function in Python. To execute a function in python it must be called. See below example:
def
# this is function definition def my_print() : print("Hello World") # execute the above defined method my_print()
1.4m articles
1.4m replys
5 comments
56.9k users