How to print in Python few user Inputs with one variable.
How to print few user Inputs with one variable and make sure it will return first character capitalized.
Python- print few inputs with one variable and format text with f-string. |
str.title():
Return a titlecased version of the string where words start with an uppercase character and the remaining characters are lowercase.
Return a titlecased version of the string where words start with an uppercase character and the remaining characters are lowercase.
My name is: Marcin
My brother is: Daniel
My sister is: Magda
Marcin,Daniel,Magda
Process finished with exit code 0
f'- string:
With new f'-string method we can nicely and easy assign few variables and construct them in the way we want to print it later.
If we want to print it separated with commas: Name, Brother, Sister .
All is needed to make the code with syntax: f'{name},{brother},{sister} .
Comments
Post a Comment