Advertisement
tklasell

Variables and Strings

Feb 25th, 2020
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.36 KB | None | 0 0
  1. Variables are used to store values. A string is a series of characters, surrounded by single or double quotes.
  2. Hello world print("Hello world!")
  3. Hello world with a variable msg = "Hello world!" print(msg)
  4. Concatenation (combining strings)
  5.     first_name = 'albert'
  6.     last_name = 'einstein'
  7.     full_name = first_name + ' ' + last_name
  8.     print(full_name)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement