what's the new print statement for python 3.1?

ok, i'm being lazy, but come on, easy points for the less lazy

what is the new print statement for python 3.1, my familiar

>>>>print "hello world"

failed, and i have heard the print statement is different to 2.6

2 Answers

  • Anonymous
    1 decade ago
    Favourite answer

    the print statement has been changed to a print function


    print "Your Lucky Number Is: ", 13


    print("Your Lucky Number Is: ", 13)

  • Anonymous
    5 years ago

    it looks right to me the problem may be with your input data. are you parsing the data into names and credits and did you convert the credits to an int (in C# you would do int.Parse(credits)) if not they are still strings and you would want to change your if to (credits < = "31") PS i don't even know what python is i am a C# programmer but most languages have the same logic just different syntax.

Still have questions? Get answers by asking now.