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

Hen Hanna henhanna at gmail.com
Sun Feb 26 02:45:01 EST 2023


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', 'if', 'zero?', 'x', '0', '1', 'A', 'B', 'C', '!', 'just', 'an', 'example']

 (a, b, c, ?, def, f, x, if, zero?, x, 0, 1, A, B, C, !, just, an, example)




More information about the Python-list mailing list