comma separated string printing - Introduction to Python: Absolute Beginner Module 1 Video 17

Veröffentlicht am: 25 Juli 2021
auf dem Kanal: Book Simplifiers
1,689
6

Concept: print formatting
using comma print formatting with strings
Python provides several methods of formatting strings in the print() function beyond string addition

The print() function supports using commas to combine strings for output
by comma separating strings print() will output each string separated with a space by default
comma formatted print()
[ ] print 3 strings on the same line using commas inside the print() function
Example
review and run code

name = "Colette"

string addition
print("Hello " + name + "!")

comma separation formatting
print("Hello to",name,"who is from the city")
Task 1
print 3 strings on the same line using commas inside the print() function

[ ] print 3 strings on the same line using commas inside the print() function


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