How do you declare a string variable in Python? Flashcards

(1 cards)

1
Q

How do you declare a string variable in Python?

A

To declare a string variable in Python, enclose the text in single or double quotes, e.g., name = “Alice” or name = ‘Alice’.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly