def spam():
"""prints Eggs to the console???"""
print "Eggs!"

Define the spam function above this line.


in the above code why do we write spam() on the last line??????


Indent your code properly..

for example..

def somefunction():
    """This is my function"""
    print something

Notice : I have indented the comment too.


what does %d mean??????


have your current problem resolved?


yes thank you i have understood


%d is used for string formatting.
It denotes decimal (base 10) integer (mentioned in post[link]).


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.