0
import socket
HOST = "swemach.se"
PORT = 21
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((HOST, PORT)
data = s.recv(1024)
s.close()
print "%s" % data
給我的錯誤Python的插座幫助(語法錯誤)
File "main.txt", line 7
data = s.recv(1024)
^
SyntaxError: invaild syntax
打算什麼我錯了?任何提示/解決方案?