Main menu

Pages

News Sports

Python Tutorial, simple program printing hello world #1



Strings in python are surrounded by either single quotation marks, or double quotation marks. 'hello' is the same as "hello". You can display a string literal with the print () function: 

 Example:

print("Hello")
print('Hello')

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:

a = "Hello"
print(a)



watch the following full tutorial video:


 

Comments