-
Let's get started to learn Python !Python/Learn Python from Codecademy 2020. 10. 3. 22:46
it's my first object to learn after making a decision about what i want to be. I hope to keep studying and never give up until i see the end!
Here's what i learnt
Four string methods
1. Len() : it gets the length ( the number of characters) of a string!
2. Lower() : it gets rid of all the capitalization in your strings. ~~.lower()
3. Upper() : it makes a string completely upper case.
4. Str() : It’s a less straightforward. This method turns non-strings into strings!
Dot Notation : this method only works with strings. On the other hand, len() and str() can work on other data types.
Printing strings : the area where we’ve been writing our code is called the editor. The console is where the results of your code is shown. Print simply displays your code in the console.
String Concatenation : The + operator between strings will add them together, one after the other. Notice that there are spaces inside the quotation marks after “Life” and “of” so that we can make the combined string. Combining strings together like this is called concatenation.
Explicit string Conversion : sometimes you need to combine a string with something that isn’t a string. In order to do that, you have to convert the non-string into a string. The str() method converts non-string into strings.