Gestalte GoConqr mit. Was sollen wir als Nächstes hinzufügen?

Karteikarten

Basic Python - Strings

Rebecca Noel Python Basics none Englisch 5,0Durchschnittliche Bewertung 5,0 von 5 (1 Bewertung) 14 Karten

Karten in diesem Stapel (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.

Informationen

Beschreibung
String concepts/vocab with Python
Erstellt von
Rebecca Noel
Aufrufe
132
Tags
pythonstringsstringprogrammingcoding
Bewertung
Durchschnittliche Bewertung 5,0 von 5 (1 Bewertung)

Mehr zu Python Strings

Feedback

Worum geht es?

Was sollen wir als Nächstes hinzufügen?