miércoles, 8 de abril de 2015

#Mastery26 Strings

Besides numbers, Python can also manipulate strings, which can be expressed in several ways. They can be enclosed in single quotes ('...') or double quotes ("...") with the same result.(Click here to learn more).

You can turn any value into a string with the str( ) function (like seen in this program). you can also use string inputs. 
str(input()). 

When you make a sum of strings it will make a concatenation:

1+1=
2
"1"+"1"=        Concatenation.
"11"
"Hi "+" I´m "+" George"=    Concatenation
"Hi I´m George".

String can also be multiplied as seen in this program.

No hay comentarios:

Publicar un comentario