+ 2
What are f strings used for and when?
I know f strings is a variable embeded inside a string eg (f" Hellow {code} ")
3 odpowiedzi
+ 5
They are used for string formatting. Not just variables but functions too. I use them *a lot*
https://code.sololearn.com/c02u2z9mGS99/?ref=app
https://code.sololearn.com/cuDZKseqbJnu/?ref=app
https://code.sololearn.com/ct7l9vb3t1J6/?ref=app
https://code.sololearn.com/c7QHvVgdKyB3/?ref=app
https://code.sololearn.com/c3UgYFOpBtf3/?ref=app
https://code.sololearn.com/chu0Xaheiq4W/?ref=app
https://code.sololearn.com/cr2bE8cvDCSN/?ref=app
+ 3
@Thomas william wow! Thank you man,i wish i can be in an advance stage of coding,and code just like you,me i'm just a beginner and still on Sololearn's basics,thanks bro,i now see clearly what comments are,and how is the triple("""
""") string quotation is used for,thank you
+ 3
Vusumuzi Mabena Triple string notations are used for multi-line comments (called DocStrings). They are used to explain what a function or segment of code does 🙃