input formatting - Introduction to Python: Absolute Beginner Module 1 Video 22

Publié le: 27 juillet 2021
sur la chaîne: Book Simplifiers
127
7

Concept: Format Input
Formatting string input()
When storing input, sometimes a specific format is needed and formatting is applied to the input() function

Note: this technique overwrites the original user input in the variable with the formatted value

Example
review and run code - test a capitalized color input
fav_color = input('What is your favorite color?: ').lower()
print(fav_color)
Task 2
[ ] format input() with .upper()
[] input variable fav_color as upper

[] print fav_color


Sur cette page du site, vous pouvez voir la vidéo en ligne input formatting - Introduction to Python: Absolute Beginner Module 1 Video 22 durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur Book Simplifiers 27 juillet 2021, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 127 fois et il a aimé 7 téléspectateurs. Bon visionnage!