Latest web development tutorials

Python beinhaltet 33 Übungen

Python 100 Li Python 100 Li

Titel: Drücken Sie die kommagetrennte Liste.

Programmanalyse: Keine.

Source Code:

#!/usr/bin/python
# -*- coding: UTF-8 -*-

L = [1,2,3,4,5]
s1 = ','.join(str(n) for n in L)
print s1

Das obige Beispiel Ausgabe lautet:

1,2,3,4,5

Python 100 Li Python 100 Li