Quiz on Strings and Lists
Test your knowledge of strings and lists in Python.
1
(Select all that apply.) We want to store the following string in the variable msg
. Which of the following shows the correct syntax in Python?
This string has text1 and text2 in it
A)
msg = '''This string has text1 and text2 in it'''
B)
msg = 'This string has text1 and text2 in it"
C)
msg = "This string has text1 and text2 in it"
D)
msg = "This string has text1 and text2 in it"
Question 1 of 60 attempted
Get hands-on with 1400+ tech skills courses.