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

Publicado em: 27 Julho 2021
no canal de: 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


Nesta página do site você pode assistir ao vídeo on-line input formatting - Introduction to Python: Absolute Beginner Module 1 Video 22 duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário Book Simplifiers 27 Julho 2021, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 127 vezes e gostou 7 espectadores. Boa visualização!