[source code] Python Programming Tutorial - 3 - Strings

+3 Bucky Roberts · August 26, 2014

>>> Bucky Roberts
SyntaxError: invalid syntax
>>> "Bucky Roberts"
'Bucky Roberts'
>>> 'Bucky Roberts is awesome!'
'Bucky Roberts is awesome!'
>>> 'I don't think shes 18'
SyntaxError: invalid syntax
>>> "I don't think shes 18"
"I don't think shes 18"
>>> 'She said, "What part of the cow is the meatloaf from?" '
'She said, "What part of the cow is the meatloaf from?" '
>>> 'I don\'t think shes 18'
"I don't think shes 18"
>>> print("hey now brown cow")
hey now brown cow
>>> print('C:\Bucky\Desktop\nudePics')
C:\Bucky\Desktop
udePics
>>> print(r'C:\Bucky\Desktop\nudePics')
C:\Bucky\Desktop\nudePics
>>> firstName = "Bucky "
>>> firstName + "Roberts"
'Bucky Roberts'
>>> firstName + "McLovin"
'Bucky McLovin'
>>> firstName * 5
'Bucky Bucky Bucky Bucky Bucky '

Post a Reply

Replies

Oldest  Newest  Rating
0 youssef samwel · September 23, 2015
Your the best and if you want Microsoft office 2016 pro plus latest version or windows 10 pro latest version my E-mail samwelyoussef123@gmail.com
  • 1

Python

106,984 followers
About

This section is all about snakes! Just kidding.

Links
Moderators
Bucky Roberts Administrator