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

  • InsideBlackBerry

    InsideBlackB

    14 Aralık 2009
  • kalabrandmusic

    kalabrandmus

    25 Kasım 2009
  • LavcoPriceTech

    LavcoPriceTe

    21 AĞUSTOS 2010