forked from makersacademy/intro-to-python
-
Notifications
You must be signed in to change notification settings - Fork 0
/
022_strings.py
33 lines (20 loc) · 704 Bytes
/
022_strings.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# Video alternative: https://youtu.be/QoSng0as5BY&t=308s
# A string is a sequence of characters (letters).
# You've already seen the string syntax dotted around. Here
# it is:
my_name = "Kay"
print(my_name)
# They are surrounded by double quotes:
my_name = "Kay"
# Or single quotes:
my_name = 'Kay'
# In Python, there's no meaningful difference between the
# two.
# Try out creating a string with your name in it:
your_name = ???
print(your_name)
# @TASK: Check your work by running this file with:
# python 022_strings.py
# As you may have worked out, the `print(string)` function
# prints a string to the shell so you can see it.
# When you're satisfied, move on to 023_string_indexing.py