Python String Variables


Assign String to a Variable

Assigning a string to a variable is done with the variable name followed by an equal sign and the string:

Example

a = "Hello"
print(a)
Try it Yourself »


Copyright 1999-2023 by Refsnes Data. All Rights Reserved.