Help shape GoConqr. What should we add next?

Flashcards

Basic Python - Strings

Rebecca Noel Python Basics none English 5.0Average rating 5.0 out of 5 (1 rating) 14 cards

Cards in this deck (14)

  1. 1When do we use double quotes with strings?1. So we can properly print a string that includes an apostrophe.
    2. So we can include the single quotes when we print the string.
  2. 2When do we use the print function?When we are printing out several sequences.
  3. 3What does the len() function do?It checks the length of a string.
  4. 4How do you assign a string to a variable?variable = 'string'
  5. 5What symbols do we use to call an index of a string?brackets []
  6. 6What number does indexing begin with?0
  7. 7If s = 'Hello World', then what would s[:3] print?'Hel'
  8. 8If s = 'Hello World', then what would s[:-1] print?'Hello Worl'
  9. 9What symbols can we use to specify the frequency to grab elements when indexing?::
  10. 10T/F?: Strings are immutable, meaning the elements within can not be changed or replaced once it is created.True
  11. 11T/F?: You cannot link or add to (concatenate) a string once created.False
  12. 12T/F?: You cannot reassign a string once it is created.False
  13. 13How do we call a method?object.method(parameters)
  14. 14What is the .format() method used for?The .format() method adds formatted objects to printed string statements.

Information

Description
String concepts/vocab with Python
Created by
Rebecca Noel
Views
132
Tags
pythonstringsstringprogrammingcoding
Rating
Average rating 5.0 out of 5 (1 rating)

More on Python Strings

Feedback

What is it about?

What should we add next?