Skip to content

Commit 4365801

Browse files
committed
2 of that
1 parent 913896f commit 4365801

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

Lists & Strings/2.py

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
line = 'A lot of spaces'
2+
etc = line.split()
3+
print(etc)
4+
5+
6+
line = 'first;second;third'
7+
thing = line.split()
8+
print(thing)
9+
print(len(thing))
10+
11+
thing = line.split(';')
12+
print(thing)
13+
print(len(thing))
14+
15+
16+
# When you do not specify a delimiter, multiple spaces are treated like one delimiter.
17+
18+
# You can specify what delimiter character to use in the splitting.

0 commit comments

Comments
 (0)