the programs are about strings in python.Strings in python are surrounded by either single quotation marks, or double quotation marks. the programs talk about string methods string formatting finding the length using springs indexing the strings using [] operator treating numbers as characters How to create a string in python To create a string, put the sequence of characters inside either single quotes, double quotes, or triple quotes and then assign it to a variable. You can look into how variables work in Python in the Python variables tutorial. For example, you can assign a character 'a' to a variable single_quote_character . How to read a string in python To read a string from console as input to your Python program, you can use input() function. input() can take an argument to print a message to the console, so that you can prompt the user and let him/her know what you are expecting.
-
Notifications
You must be signed in to change notification settings - Fork 0
ongechi/python-strings
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published