alphabet = "a b c d e f"
tstr = alphabet.split()
for c in tstr:
print c
a함수 split()은 아래 예와 같이 문자 또는 패턴의 최대 감지 횟수를 매개변수로 사용합니다.
b
c
d
e
f
alphabet = "a b c d e f"런타임:
tstr = alphabet.split(" ", 3)
for c in tstr:
인쇄 c
a
b
c
d e f
s = 'exemple.domaine.net'런타임:
i = s.split('.', 1)
nom_de_domaine = i[1]
print nom_de_domaine
domaine.net참조:
Please disable your ad blocker and refresh the window to use this website.