SORU
5 Mayıs 2009, Salı


Python 3 ile baskı sözdizimi hatası

Neden Python 3'te bir string yazdırırken, bir sözdizimi hatası alıyorum?

>>> print "hello World"
  File "<stdin>", line 1
    print "hello World"
                      ^
SyntaxError: invalid syntax

CEVAP
5 Mayıs 2009, Salı


Python 3 print bir işlevi oldu. Bu parantezi hemen eklemek gerekir anlamına gelir.

print("Hello World")

http://docs.python.org/3.0/whatsnew/3.0.html#print-is-a-function

Bunu Paylaş:
  • Google+
  • E-Posta
Etiketler:

YORUMLAR

SPONSOR VİDEO

Rastgele Yazarlar

  • Epic Tutorials for iPhone, iPad and iOS

    Epic Tutoria

    18 EYLÜL 2011
  • fireflame65

    fireflame65

    27 Mart 2007
  • Triune Films

    Triune Films

    9 ŞUBAT 2006