Strings in Python: index operator [ ]

Veröffentlicht am: 03 Juni 2020
auf dem Kanal: Olga Soboleva
74
3

#indexpython #pythonexercise #stringspython

How would you use the index operator [ ] to print out the letters w, f and the apostrophe ' from the following string?

'Those who don't learn from history are doomed to repeat it.'
______________________________________________________________________________________

A string is a sequence of characters or a line of characters. Each line of characters has indexable data within it. Using a string operator [ ] we can pull any character out of the string. The first index in a string starts with zero. For example if we have a five-character string that last index position is position 4. The value inside the string operator [ ] is called the index value. It can be a number, a variable or even an expression and it must be an integer.

Python course #2 in English 2
Python programming language course in English

#pythonexercises #pythontasks #python程式設計語言 #python程式設 #程式設計語言 #程式設


Auf dieser Seite können Sie das Online-Video Strings in Python: index operator [ ] mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Olga Soboleva 03 Juni 2020 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 74 Mal angesehen und es wurde von 3 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!