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

Published: 27 July 2021
on channel: 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


On this page of the site you can watch the video online input formatting - Introduction to Python: Absolute Beginner Module 1 Video 22 with a duration of hours minute second in good quality, which was uploaded by the user Book Simplifiers 27 July 2021, share the link with friends and acquaintances, this video has already been watched 127 times on youtube and it was liked by 7 viewers. Enjoy your viewing!