this post was submitted on 01 Jul 2023
20 points (88.5% liked)

Python

6471 readers
8 users here now

Welcome to the Python community on the programming.dev Lemmy instance!

πŸ“… Events

PastNovember 2023

October 2023

July 2023

August 2023

September 2023

🐍 Python project:
πŸ’“ Python Community:
✨ Python Ecosystem:
🌌 Fediverse
Communities
Projects
Feeds

founded 2 years ago
MODERATORS
20
submitted 1 year ago* (last edited 1 year ago) by qwop to c/python
 

A post about how this community's banner used the python 2 print syntax - print "Hello World" - made me question, can we print a hello world message in Python 3 without using parentheses?

It turned out to be sort of a fun challenge, I've found 3 different approaches that work. I'd be interested to see what you come up with! (it seems I can't put spoilers in Lemmy, so I won't share my solutions yet in case y'all want to have a go).

Edit: Posted my solutions in the comments

you are viewing a single comment's thread
view the rest of the comments
[–] sisyphean 5 points 1 year ago (1 children)

You can put spoilers in posts or comments this way:

TitleSecret

Here is how it renders:

TitleSecret

(AFAIK apps don't render these correctly, only the website)

[–] [email protected] 6 points 1 year ago (1 children)

Can confirm not hiding on Memmy

[–] [email protected] 5 points 1 year ago (2 children)

Same on Jerboa. Though given the apps' fast development progress we probably won't have to wait too long :)

[–] pythonoob 1 points 1 year ago

Not working on connect either