#๐Ÿ”’ How to print

50 messages ยท Page 1 of 1 (latest)

alpine pondBOT
#

@kind tiger

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

kind tiger
#
print Hello
#

doesnt work

#

expect it to print hello

#

with a capital H though

lofty nest
#

print("Hello")

kind tiger
#

ahhh

#

well

#

do i need to import system

lofty nest
#

nop

#

string literals / a series of characters are written as "your string here"

kind tiger
#

im used to c#

lofty nest
#

and the print method is built into python, and the first parameter you specify within the () is what you want to print

remote ridge
#

!res @kind tiger check these out

alpine pondBOT
#
Resources

The Resources page on our website contains a list of hand-selected learning resources that we regularly recommend to both beginners and experts.

lofty nest
#

yeah so basically Console.WriteLine("Hello") is print("Hello") in python, except you dont need to import anything unlike System in C#.

kind tiger
kind tiger
#

what's my next step

#

learning how to use sockets?

stone crystal
#

no

#

first learn the basics of it

ivory quiver
#

you can't just jump from not knowing how to use print to sockets

kind tiger
#

ong i can

ivory quiver
#

that's like going from caveman to rocket ship in a second

stone crystal
#

right

ivory quiver
kind tiger
#

give me a second

#

trust the process

#
import socket

socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
socket.bind(("0.0.0.0", 8820))

socket.listen(1)

client, addr = socket.accept()
client.send("Hello".encode())
socket.close()
stone crystal
#

Rule 10
Do not copy and paste answers from ChatGPT or similar AI tools.

kind tiger
#

??? i didnt

#

i wrote it on live to you

#

dude stop arguing with me please

thorn sail
ivory quiver
#

but im pretty sure it was copied from somewhere.

kind tiger
#

๐Ÿ˜‚

kind tiger
#

ill even make the client side

#

k idk how

ivory quiver
#

okay you're starting to sound like a troll, have fun.

alpine pondBOT
#
Python help channel closed

This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.

#

๐Ÿ”’ How to print