Skip to content

Commit 913896f

Browse files
committed
1 of Strings & Lists
1 parent 31faa69 commit 913896f

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

Lists & Strings/1.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
abc = "With three words"
2+
stuff = abc.split()
3+
print(stuff)
4+
print(len(stuff))
5+
print(stuff[0])
6+
print(stuff)
7+
for w in stuff:
8+
print(w)
9+
10+
# Split breaks a string into parts and produces a list of strings.
11+
# We think of these as words.
12+
# We can access a particular word or loop through all the words.

0 commit comments

Comments
 (0)