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 thread.
View all comments

You can put spoilers in posts or comments this way:

::: spoiler Title
Secret
:::

Here is how it renders:

Title

Secret

(AFAIK apps donโ€™t render these correctly, only the website)

permalink
report
reply
6 points

Can confirm not hiding on Memmy

permalink
report
parent
reply
5 points

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

permalink
report
parent
reply
1 point

Not working on connect either

permalink
report
parent
reply

Python

!python@programming.dev

Create post

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

๐Ÿ“… Events
October 2023
November 2023
Past

July 2023

August 2023

September 2023

๐Ÿ Python project:
๐Ÿ’“ Python Community:
โœจ Python Ecosystem:
๐ŸŒŒ Fediverse
Communities
Projects
  • Pythรถrhead: a Python library for interacting with Lemmy
  • Plemmy: a Python package for accessing the Lemmy API
  • pylemmy pylemmy enables simple access to Lemmyโ€™s API with Python
  • mastodon.py, a Python wrapper for the Mastodon API
Feeds

Community stats

  • 471

    Monthly active users

  • 436

    Posts

  • 2.1K

    Comments