String

A string variable can be used to store text.

Input:

# source_code/appendix_c_python/example04_string.py
first_name = "Satoshi"
last_name = "Nakamoto"
full_name = first_name + " " + last_name
print "The inventor of Bitcoin is", full_name, "."

Output:

$ python example04_string.py
The inventor of Bitcoin is Satoshi Nakamoto .
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset