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
In questa pagina del sito puoi guardare il video online comma separated string printing - Introduction to Python: Absolute Beginner Module 1 Video 17 della durata di ore minuti seconda in buona qualità , che l'utente ha caricato Book Simplifiers 25 luglio 2021, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 1,689 volte e gli è piaciuto 6 spettatori. Buona visione!