Latest web development tutorials

Python meliputi latihan 33

Python 100 Li Python 100 Li

Judul: Tekan daftar dipisahkan koma.

Analisis Program: Tidak ada.

Source Code:

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

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

Contoh di atas output:

1,2,3,4,5

Python 100 Li Python 100 Li