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

Veröffentlicht am: 27 Juli 2021
auf dem Kanal: 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


Auf dieser Seite können Sie das Online-Video input formatting - Introduction to Python: Absolute Beginner Module 1 Video 22 mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Book Simplifiers 27 Juli 2021 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 127 Mal angesehen und es wurde von 7 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!