Demo: Formatting Strings | Python for Beginners [12 of 44]

preview_player
Показать описание


#microsoftdeveloper #pythonforbeginners #learntocode
Рекомендации по теме
Комментарии
Автор

For any of you that are wondering what the "f" order does to the formatting of the stings, it only serves the purpose of creating the space between the strings and sparing you the trouble of having to type the "+" sign again and again and the trouble of typing out a space element in the string. It has absolutely nothing to do with Capitalize or Upper/Lower case. He should have clarified this.

aaronxiang
Автор

2:15 Advantaje of specify the numbers: 0 and 1.
2:45 Different ways to do string concatenation.
3:00 Reading in the best way.
3:15 Similar in JavaScript or C# (C Sharp).
3:30 Self-documenting.

HECTORARTUROA
Автор

I am newbee in python with no past experience in of language of any kind. these lecture sure are very good and simple and helping learning.

JaleebiBaby
Автор

Looks like the f prefix also works directly in a print statement
print(f'Hello {first_name} {last_name}')

hutsyAUS
Автор

my issue was I was leaving a space after the f, see examples below.

output =f 'Hello, {first_name} {last_name}'
print (output)

SyntaxError: invalid syntax

output = f'Hello, {first_name} {last_name}'
print (output)

Hello, John Doe

eastsideozzy
Автор

how does he do it without dark mode I won't ever understand :O

pabl
Автор

Very clear videos and explanation
Thank you

jamilhfl
Автор

I'm using python 3.7.4 and I can't use the last method, with the f at the beginning. Why is that? Console throws a syntax error

jerkov
Автор

write 'python3' instead of just 'python' in the terminal when running the command if ur getting syntax error despite having python 3 downloaded.

bilalsidiqi
Автор

please what do i do or type when my code only runs on the shell for a short period of time and closes afterwards

stanleyogbonnaya
Автор

am using python 3.11 and i can't ue this all methode u showed at all any soloution ?

wolfproduction
Автор

excuse me, which one is the fastest for performance?

n
Автор

Really helpful videos. Thx for sharing.

royjayanta
Автор

So, f and .format are ALWAYS initial caps with a space between outputs? How would you designate other formats, like ALL CAPS or all lower case?

DeborahSavadra
Автор

Which font are you are using... it's awesome ...

soumeshk
Автор

what if you have multiple outputs do you have to write print(output) every single time?

hadeelbayati
Автор

I have Mac, and the f doesn't work, i get SyntaxError: invalid syntax. Any ideas?

shaharziv
Автор

output=f"Hello, {first_name} {last_name}, is not working .. ?

SaadKhawajaCollection
Автор

how to capitalize in the last method ??

rezanaghashzade
Автор

# you can also do it this way
output = "Hello, %s %s" % (first_name, last_name)
print(output)

farajlagum