so, i bought a book to learn python.then i write the exactly same the code what that book said.here the code. https://code.sololearn.com/cZDdvAxhGCQy/?ref=app the book said,its using python 2.7.but i tried both 2.7 and 3.5.none of them working.whats wrong?
7/28/2017 9:55:38 AM
Kevin AS5 Answers
New AnswerOn line 9, try passing a tuple instead of 2 arguments, like this: server.bind( (bind_ip, bind_port) )
They are string format symbols. When you start your program, instead of %s it prints a string and instead of %d it prints an integer number print("ip address: %s, port number: %d" % ("127.0.0.1", 80)) will print: ip address: 127.0.0.1, port number: 80
Thanks, but I am not. Everyone can learn these things, just need to study a lot
Sololearn Inc.
535 Mission Street, Suite 1591Send us a message