File tree Expand file tree Collapse file tree 1 file changed +10
-11
lines changed Expand file tree Collapse file tree 1 file changed +10
-11
lines changed Original file line number Diff line number Diff line change @@ -375,6 +375,16 @@ print(myString) # you would have to assign it to a new variab
375
375
~~~
376
376
{: .language-python}
377
377
378
+ ~~~
379
+ True
380
+ 0
381
+ THE QUICK BROWN FOX
382
+ The quick brown fox
383
+ False
384
+ True
385
+ ~~~
386
+ {: .output}
387
+
378
388
The methods starting with 'is...' return a boolean value of either True or False
379
389
380
390
~~~
@@ -398,17 +408,6 @@ print(mystring_clean.isalpha())
398
408
~~~
399
409
{: .language-python}
400
410
401
-
402
- ~~~
403
- True
404
- 0
405
- THE QUICK BROWN FOX
406
- The quick brown fox
407
- False
408
- True
409
- ~~~
410
- {: .output}
411
-
412
411
If you need to refer to a specific element (character) in a string,
413
412
you can do so by specifying the index of the character in ` [] `
414
413
you can also use indexing to select a substring of the string. In Python,
You can’t perform that action at this time.
0 commit comments