techhub.social is one of the many independent Mastodon servers you can use to participate in the fediverse.
A hub primarily for passionate technologists, but everyone is welcome

Administered by:

Server stats:

4.9K
active users

RecursiveNeuron :verified:

🌀What is wrong with the following python code snippet

#▪️▪️▪️
l =["c"
"py",
"js"
]
#▪️▪️▪️

We missed the comma after "c". The python will concatenate it with "py". Resulting in ["cpy","js"].

@RecursiveNeuron That looks like a bit of syntatic sugar that might cause more pain than it relieves.

@RecursiveNeuron Python's automatic string concatenation can be useful for splitting long strings across multiple physical lines to improve readability and stay within line length limits.