Re: one Liner: Lisprint(x) --> (a, b, c) instead of ['a', 'b', 'c']

2023-02-27 Thread Greg Ewing via Python-list
On 28/02/23 4:24 pm, Hen Hanna wrote: is it poss. to peek at the Python-list's messages without joining ? It's mirrored to the comp.lang.python usenet group, or you can read it through gmane with a news client. -- Greg -- https://mail.python.org/mailman/listinfo/py

RE: one Liner: Lisprint(x) --> (a, b, c) instead of ['a', 'b', 'c']

2023-02-26 Thread avi.e.gross
t;> print(p2b(nested)) (1, 2, (3, 4, (5, 6, 7), 8), 9) People who speak python well do not necessarily lisp. -Original Message- From: Python-list On Behalf Of Hen Hanna Sent: Sunday, February 26, 2023 4:54 AM To: python-list@python.org Subject: Re: one Liner: Lisprint(x) --> (a,

Re: one Liner: Lisprint(x) --> (a, b, c) instead of ['a', 'b', 'c']

2023-02-26 Thread Hen Hanna
On Saturday, February 25, 2023 at 11:45:12 PM UTC-8, Hen Hanna wrote: > def Lisprint(x): print( ' (' + ', '.join(x) + ')' , '\n') > > a= ' a b c ? def f x if zero? x 0 1 ' > a += ' A B C ! just an example ' > x= a.split() > > print(x) > Lisprint(x) > > ['a', 'b', 'c', '?', 'def', 'f', 'x',